You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
568 B
Docker
29 lines
568 B
Docker
FROM luuviethai/node-16-alpine as builder
|
|
|
|
WORKDIR '/usr/src/app'
|
|
|
|
COPY package.json ./
|
|
|
|
RUN yarn install
|
|
|
|
COPY ./ ./
|
|
|
|
# ENV CHOKIDAR_USEPOLLING=true
|
|
|
|
RUN yarn run build
|
|
|
|
#nginx base image
|
|
FROM nginx
|
|
|
|
# nginx 의 default.conf backup
|
|
# RUN mv /etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf.backup
|
|
|
|
# host pc 의 nginx.conf 를 아래 경로에 복사
|
|
# COPY ./nginx.conf /etc/nginx/conf.d
|
|
COPY --from=builder /usr/src/app/build /usr/share/nginx/html
|
|
|
|
# 80 포트 오픈
|
|
EXPOSE 80
|
|
|
|
# container 실행 시 nginx 시작함
|
|
CMD ["nginx", "-g", "daemon off;"] |