mirror of
https://github.com/docker/awesome-compose.git
synced 2025-04-26 10:43:35 +02:00
init (#120)
Signed-off-by: Grant Birkinbine <grant.birkinbine@gmail.com>
This commit is contained in:
parent
a42a8531ab
commit
4480b64e58
10 changed files with 313 additions and 0 deletions
32
nginx-wsgi-flask/nginx/Dockerfile
Normal file
32
nginx-wsgi-flask/nginx/Dockerfile
Normal file
|
@ -0,0 +1,32 @@
|
|||
FROM nginx:1.19.7-alpine
|
||||
|
||||
# Add bash for boot cmd
|
||||
RUN apk add bash
|
||||
|
||||
# Add nginx.conf to container
|
||||
COPY --chown=nginx:nginx nginx.conf /etc/nginx/nginx.conf
|
||||
COPY --chown=nginx:nginx start.sh /app/start.sh
|
||||
|
||||
# set workdir
|
||||
WORKDIR /app
|
||||
|
||||
# permissions and nginx user for tightened security
|
||||
RUN chown -R nginx:nginx /app && chmod -R 755 /app && \
|
||||
chown -R nginx:nginx /var/cache/nginx && \
|
||||
chown -R nginx:nginx /var/log/nginx && \
|
||||
chmod -R 755 /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
|
||||
|
||||
# # Uncomment to keep the nginx logs inside the container - Leave commented for logging to stdout and stderr
|
||||
# RUN mkdir -p /var/log/nginx
|
||||
# RUN unlink /var/log/nginx/access.log \
|
||||
# && unlink /var/log/nginx/error.log \
|
||||
# && touch /var/log/nginx/access.log \
|
||||
# && touch /var/log/nginx/error.log \
|
||||
# && chown nginx /var/log/nginx/*log \
|
||||
# && chmod 644 /var/log/nginx/*log
|
||||
|
||||
USER nginx
|
||||
|
||||
CMD ["nginx", "-g", "'daemon off;'"]
|
Loading…
Add table
Add a link
Reference in a new issue