21 lines
526 B
Docker
21 lines
526 B
Docker
# 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
|
|
|
|
# Expose port 80
|
|
EXPOSE 80
|
|
|
|
# Use the entry script as the entrypoint
|
|
ENTRYPOINT ["/docker-entrypoint.sh"] |