Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Attempt to build Docker image including @pnp/generator-spfx fails #149
What Version you are running?
Also tried Dockerfile FROM node:10.10.0
Describe your problem
When attempting to build a Docker image using the current 1.6.1 build, see Dockerfile below, the image creation fails with what looks to be issues with access issues to the file system for the user. output of build.sh below as well.
Removing the @email@example.com install completes image creation, and SPFx project can be created from running container instance.
log.txt (from ./build.sh including generator-spfx)
Thank you for sharing - @pkskelly
First, let's take a look at the run npm install:
Just separate the lines for better visibility:
Additional steps for add-ons won't be included when you run
In the background, it executed the
You need to append to the npm install simply
So overall you should be fine with a docker file that looks like this:
In addition I removed the following line too:
This only adds the user to a group named 'sudo', that currently do not exist on Docker images anymore. After playing with this stuff today, well I learned some things too. Thank you very much for let me go back to Docker after some time.
I still experience some issue in my docker file now but it seems to be more releated to SPFx overall but not for the installation or container.
Feel free to ask my anything you like.
@StfBauer THANKS so much for the detailed explanation! I thought it might be something simple. Always lots to learn and I appreciate you taking the time to provide the details.
I tried your modifications above to the Dockerfile, and the image was built successfully. However, I only get the @microsoft/sharepoint generator, and no option for the @pnp/spfx generator as I would expect. Strangely, running
Is this what you are seeing as well?
@StfBauer I copied your Dockerfile content from above. Below is a copy and paste of my current docker file.
Apparently, when removing previous images, there was not a full clean. Detailed check of the image build output revealed it was still calling my old RUN command.
To be sure I had no remnants of old images, I ran the following to clean all images and containers.
The build.sh now builds the image and completes fine, and I only see the pnp/spfx generator when running