# Minimal Nginx server for static files FROM nginx:alpine # Remove default Nginx configuration RUN rm /etc/nginx/conf.d/default.conf # Copy custom Nginx configuration from your project context # Example nginx.conf content for a static site: # server { # listen 80; # location / { # root /usr/share/nginx/html; # index index.html index.htm; # try_files $uri $uri/ /index.html; # } # } COPY nginx.conf /etc/nginx/conf.d/default.conf # Copy your static website files into the Nginx document root # Assuming your static files are in a 'public' directory in your build context COPY ./public /usr/share/nginx/html EXPOSE 80 # Start Nginx in the foreground CMD ["nginx", "-g", "daemon off;"]