Files
dyolink/infrastructure/nginx/Dockerfile

19 lines
374 B
Docker
Raw Normal View History

FROM nginx:alpine
# Remove default configuration
RUN rm /etc/nginx/conf.d/default.conf
# Copy custom configuration
COPY nginx.conf /etc/nginx/conf.d/
# 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 443
CMD ["nginx", "-g", "daemon off;"]