-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (23 loc) · 904 Bytes
/
Dockerfile
File metadata and controls
32 lines (23 loc) · 904 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# nginx 이미지를 사용합니다. 뒤에 tag가 없으면 latest 를 사용합니다.
FROM nginx
# root 에 app 폴더를 생성
RUN mkdir /app
# work dir 고정
WORKDIR /app
# work dir 에 build 폴더 생성 /app/build
RUN mkdir ./build
# host pc의 현재경로의 build 폴더를 workdir 의 build 폴더로 복사
ADD ./build ./build
ADD ./ssl/ca_bundle.crt /etc/nginx/ca_bundle.crt
# nginx 의 default.conf 를 삭제
RUN rm /etc/nginx/conf.d/default.conf
# host pc 의 nginx.conf 를 아래 경로에 복사
COPY ./nginx.conf /etc/nginx/conf.d
COPY ./ssl/certificate.crt /etc/nginx/certificate.crt
COPY ./ssl/private.key /etc/nginx/private.key
RUN cat /etc/nginx/certificate.crt /etc/nginx/ca_bundle.crt >> /etc/nginx/certificate2.crt
# 80,443 포트 오픈
EXPOSE 80
EXPOSE 443
# container 실행 시 자동으로 실행할 command. nginx 시작함
CMD ["nginx", "-g", "daemon off;"]