-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 726 Bytes
/
Dockerfile
File metadata and controls
31 lines (22 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Use the official nginx image as the base image
FROM nginx:alpine
# Install gettext for envsubst
RUN apk add --no-cache gettext
# Accept build argument for version
ARG VERSION
ENV VERSION=${VERSION}
# Copy the public directory contents to the nginx html directory
COPY public/ /usr/share/nginx/html/
# Copy entrypoint script
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Create symlink for cleaner volume mounting
RUN ln -s /data /usr/share/nginx/html/data
# Replace version placeholder
RUN sed -i "s/__VERSION__/${VERSION}/g" /usr/share/nginx/html/index.html
# Copy nginx configuration
COPY nginx.conf /etc/nginx/nginx.conf
# Expose port 80
EXPOSE 80
# Start the application
CMD ["/entrypoint.sh"]