Created
April 2, 2019 14:26
-
-
Save nataz77/5cf69153301b09fc28bc673068986f01 to your computer and use it in GitHub Desktop.
Node.js Dockerfile with Babel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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