You can easily host multiple different versions SPFx in single machine
Use the right version of the SharePoint Framework for the particular project
Setup default image for your development team
Speed-up developer environment setup
Docker images are much more light weight than classic virtual machines.
3. AGENDA
BENEFITS OF USING DOCKER IN THE SPFX DEVELOPMENT
1 BACKGROUND
2
DOCKER IMAGE FOR YOUR SPFX TEAM
3
WHAT IS DOCKER?
CREATE DOCKER IMAGE FOR SPFX4
5
6
7
DEMO
NEXT STEPS
4. Background
GA(1.0.0), 1.0.1, 1.0.2, 1.1.0, 1.1.1, 1.1.3, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.3.4, 1.4.0, 1.4.1, 1.5.0, 1.5.1
Drop 1, Drop 2, Drop 3, Drop 4, Drop 5, Drop 6, RC0
16. Usage
Open Windows Powershell
PS C:JenkinsSPFxDockerprojects> docker run -it --rm --name spfx -v
/c/jenkins/spfx/docker/projects:/usr/app/spfx -p 5432:5432 -p 4321:4321 -p
35729:35729 jenkinsns/spfx:1.5.1
You will see the SPFx image being downloaded from the github. This might take few
minutes for the first time. Once the image is downloaded it will run inside a container and
you will be given the command prompt of the linux VM(which has all the SPFx dev tools
pre-installed)
Now our Virtual machine is ready
17.
18. Build SharePoint Framework Solution
spfx@910eaf6fa674:/usr/app/spfx$ yo @microsoft/sharepoint
spfx@f7cc6adfd5a6:/usr/app/spfx$ gulp serve
To close the container in the container cmd line run:
exit
Example : We developed and deployed a solution to production in a version 1.3.1, we need not have to upgrade to the latest version of the SPFx to do a single change. It is not worth the effort and the hours, since every new version upgrade will introduce new errors or impact, we need to proceed regression testing and also require to fix the errors and impacts.