File tree Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Expand file tree Collapse file tree 1 file changed +19
-8
lines changed Original file line number Diff line number Diff line change @@ -21,19 +21,30 @@ RUN echo `git rev-parse --short=9 HEAD` > health.html && \
21
21
22
22
RUN yarn build
23
23
24
- FROM fholzer/nginx-brotli:v1.26.2
24
+ FROM fholzer/nginx-brotli:v1.26.2Add commentMore actions
25
+
26
+ # Install bash
27
+ RUN apk add --no-cache bash shadow
28
+
29
+ RUN useradd -m -s /bin/bash devtron
30
+
25
31
26
- RUN useradd -ms /bin/bash devtron
27
32
COPY --from=builder /app/dist/ /usr/share/nginx/html
28
33
COPY ./nginx.conf /etc/nginx/nginx.conf
29
34
COPY ./nginx-default.conf /etc/nginx/conf.d/default.conf
35
+
30
36
WORKDIR /usr/share/nginx/html
31
- COPY --from=builder /app/./env.sh .
32
- COPY --from=builder /app/.env .
33
- COPY --from=builder /app/health.html .
34
37
35
- # Make our shell script executable
38
+ COPY --from=builder /app/env.sh .
39
+ COPY --from=builder /app/.env .
40
+ COPY --from=builder /app/health.html .
41
+
36
42
RUN chown -R devtron:devtron /usr/share/nginx/html && \
37
- chmod +x env.sh
43
+ chmod +x env.sh
44
+
38
45
USER devtron
39
- CMD ["/bin/bash" , "-c" , "/usr/share/nginx/html/env.sh && nginx -g \" daemon off;\" " ]
46
+
47
+ # Override the default ENTRYPOINT to allow shell scripting as fholzer/nginx-brotli has by-default entrypoint of nginx
48
+ ENTRYPOINT ["/bin/bash" , "-c" ]
49
+
50
+ CMD ["./env.sh && nginx -g 'daemon off;'" ]
You can’t perform that action at this time.
0 commit comments