FROM nginx:1.29-alpine # Remove default config RUN rm /etc/nginx/conf.d/default.conf # Copy nginx main config COPY docker/nginx.conf /etc/nginx/nginx.conf # Copy virtual host template COPY docker/default.conf.template /etc/nginx/templates/default.conf.template # Copy static website COPY . /usr/share/nginx/html # Expose HTTP port EXPOSE 80 # Nginx supports envsubst natively in /etc/nginx/templates CMD ["nginx", "-g", "daemon off;"]