Skip to content

Instantly share code, notes, and snippets.

@keatz55
Created June 8, 2018 00:10
Show Gist options
  • Save keatz55/a4c1ad77bed9f5c586e9d884476d9cf6 to your computer and use it in GitHub Desktop.
Save keatz55/a4c1ad77bed9f5c586e9d884476d9cf6 to your computer and use it in GitHub Desktop.
Node Js Dockerfile Example
FROM node
COPY package.json /tmp/package.json
RUN cd /tmp && npm install
RUN mkdir -p /src/app && cp -a /tmp/node_modules /src/app/
WORKDIR /src/app
COPY . /src/app
RUN npm run build
EXPOSE 9000
CMD ["npm", "run", "open:dist"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment