-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker build is failing on npm install --production command #27
Comments
Can you try changing that npm install line to this to see if you get more details about the error?
|
Thanks for the quick response. Since this is happening on docker container, I tried running the container in the interactive mode and run the command npm install --production --loglevel verbose. Got the following error: Illegal instruction (core dumped) Before doing above, I modified the docker file as you suggested and run the build command. Here is the entry from /var/log/syslog file: Dec 31 16:21:00 faisal-HP-Compaq-6005-Pro-SFF-PC kernel: [1024952.718497] docker0: port 2(vethd1855f6) entered blocking state |
I don't have good advice for debugging further. Since this error appears to be related to |
OK. Thanks. |
I'm able to resolve it. But I had to create 3 entirely new Dockerfiles. I am using amazonlinux instead of lambci. Please let me know if you want me to check those Dockerfiles into your repository. |
Would you mind filing a PR? I may not merge it but it might be helpful if anyone else runs into this. Thanks! |
It has been a while since I worked on Git and forgot the commands. Here is one of the Dockerfiles (site-builder). Should be good enough for people to create others if needed. FROM amazonlinux RUN yum install -y tar RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash CMD /bin/bash -c "source /root/.nvm/nvm.sh; nvm use 6.11.5" RUN mkdir /build COPY package.json /build/package.json RUN /bin/bash -c "source /root/.nvm/nvm.sh; npm install --production" COPY index.js /build/index.js COPY homepage /build/homepage RUN zip -r /build/dist.zip . > /dev/null |
Thanks for posting! Let’s keep this issue open to make it easier for others to find. |
Deploy script is failing where it tries to build a docker image at this line.
docker build -t "cloudformation-lambda-$function" .
The error is:
The command '/bin/sh -c npm install --production' returned a non-zero code: 132.
In Dockerfile, this is the particular line which is failing:
RUN npm install --production
I tried googling it but none of the proposed solutions is working. Please help.
The text was updated successfully, but these errors were encountered: