1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/tomsun28-usthe

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
Dockerfile 864 Байты
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
tomsun28 Отправлено 17.04.2018 05:33 c2e3353
# Stage 1, based on Node.js, to build and compile Angular
FROM node:8-alpine as builder
COPY package.json package-lock.json ./
RUN npm set progress=false && npm config set depth 0 && npm cache clean --force
## Storing node modules on a separate layer will prevent unnecessary npm installs at each build
RUN npm i && mkdir /ng-app && cp -R ./node_modules ./ng-app
WORKDIR /ng-app
COPY . .
RUN $(npm bin)/ng build --prod
# Stage 2, based on Nginx, to have only the compiled app, ready for production with Nginx
FROM nginx:1.13.3-alpine
COPY ./nginx/nginx-custom.conf /etc/nginx/conf.d/default.conf
## Remove default nginx website
RUN rm -rf /usr/share/nginx/html/*
## From ‘builder’ stage copy over the artifacts in dist folder to default nginx public folder
COPY --from=builder /ng-app/dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/tomsun28-usthe.git
git@api.gitlife.ru:oschina-mirror/tomsun28-usthe.git
oschina-mirror
tomsun28-usthe
tomsun28-usthe
master