improvement: docker infrastructure overhauled.
This commit is contained in:
@@ -1,19 +1,13 @@
|
||||
FROM nginx:alpine
|
||||
|
||||
# Remove default configuration
|
||||
RUN rm /etc/nginx/conf.d/default.conf
|
||||
RUN rm -f /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Copy custom configuration
|
||||
COPY nginx.conf /etc/nginx/conf.d/
|
||||
COPY http-only.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
# Create log directory
|
||||
RUN mkdir -p /var/log/nginx && \
|
||||
chown -R nginx:nginx /var/log/nginx && \
|
||||
chmod -R 755 /var/log/nginx
|
||||
|
||||
# Switch to non-root user
|
||||
USER nginx
|
||||
EXPOSE 80
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
Reference in New Issue
Block a user