forked from thoughtworks/build-your-own-radar
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
26 lines (20 loc) · 784 Bytes
/
Dockerfile
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
FROM node:latest as source
WORKDIR /src/build-your-own-radar
COPY package.json ./
RUN npm install
COPY . ./
RUN npm run build
FROM nginxinc/nginx-unprivileged:latest
WORKDIR /opt/build-your-own-radar
COPY --from=source /src/build-your-own-radar/dist .
# COPY default.template /etc/nginx/conf.d/default.conf
# COPY ./nginx.conf /etc/nginx/nginx.conf
COPY ./default.template /etc/nginx/conf.d/default.conf
#RUN chown -R nginx:nginx /opt/build-your-own-radar && chmod -R 755 /opt/build-your-own-radar && \
# chown -R nginx:nginx /var/cache/nginx &&\
# chown -R nginx:nginx /var/log/nginx && \
# chown -R nginx:nginx /etc/nginx/conf.d
#RUN touch /var/run/nginx.pid && \
# chown -R nginx:nginx /var/run/nginx.pid
#USER nginx
CMD ["nginx", "-g", "daemon off;"]