Skip to content

Instantly share code, notes, and snippets.

@nataz77
Created April 2, 2019 14:26
Show Gist options
  • Save nataz77/5cf69153301b09fc28bc673068986f01 to your computer and use it in GitHub Desktop.
Save nataz77/5cf69153301b09fc28bc673068986f01 to your computer and use it in GitHub Desktop.
Node.js Dockerfile with Babel
FROM node:alpine
WORKDIR /usr/src/app
COPY ["package.json", "npm-shrinkwrap.json*", "./"]
RUN npm install --silent && mv node_modules ../
COPY . .
RUN npm install --save-dev @babel/core @babel/cli @babel/preset-env
RUN npm run build
EXPOSE 80
CMD ["node", "dist/server.js"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment