# Use nginx alpine as base image FROM nginx:stable-alpine # Install envsubst RUN apk add --no-cache gettext # Copy pre-built dist files into nginx COPY dist /usr/share/nginx/html # Copy nginx configuration template and entry script COPY nginx/default.conf /etc/nginx/conf.d/default.conf.template COPY docker-entrypoint.sh /docker-entrypoint.sh # Make the entry script executable RUN chmod ug+x /docker-entrypoint.sh # Set default environment variable ENV API_SERVER_URL=http://api-server:8888/ # Expose port 80 EXPOSE 80 # Use the entry script as the entrypoint ENTRYPOINT ["/docker-entrypoint.sh"]