i have an issue while trying to create my first docker image.
here is my docker file:
FROM debian:9
RUN apt-get update -yq
&& apt-get install -yq curl gnupg
&& curl -sL https://deb.nodesource.com/setup_10.x | bash
&& apt-get install -yq nodejs
&& apt-get clean
ADD . /app/
WORKDIR /app
RUN npm install
EXPOSE 2368
VOLUME /app/logs
CMD npm run start
i do have a package.json file with all dependancies in my folder but i still have this error as a response:
ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get install curl gnupg && curl -sL https://deb.nodesource.com/setup_10.x | bash && apt-get install -y nodejs && apt-get clean" did not complete successfully: exit code: 100
2
Answers
You can use node official docker image available from Docker Hub
More on NodeJS Dockerizing
To fix the issue, you can make the following modifications to your Dockerfile: