Forked from praveenweb/5.single-stage-production-node.Dockerfile
Last active
March 2, 2018 11:57
-
-
Save lex111/e66a33435c0576d1feab13f3a7c99e61 to your computer and use it in GitHub Desktop.
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:carbon | |
# Создать директорию app | |
WORKDIR /app | |
# Установить зависимости приложения | |
# RUN npm -g install serve | |
# Используется символ подстановки для копирования как package.json, так и package-lock.json | |
COPY package*.json ./ | |
RUN npm install | |
# Скопировать исходники приложения | |
COPY src /app | |
# Собрать статические файлы react/vue/angular | |
# RUN npm run build | |
EXPOSE 8080 | |
# Используется при обслуживании статических файлов | |
# CMD ["serve", "-s", "dist", "-p", "8080"] | |
CMD [ "node", "server.js" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment