-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
21 lines (17 loc) · 766 Bytes
/
Copy pathDockerfile
File metadata and controls
21 lines (17 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# lightweight Nginx image
FROM nginx:alpine
# Copy HTML, CSS, JavaScript, images, and PDF files to Nginx web root
COPY index.html /usr/share/nginx/html
COPY resume.js /usr/share/nginx/html
COPY resume.css /usr/share/nginx/html
COPY favicon.png /usr/share/nginx/html
COPY screen-record.gif /usr/share/nginx/html
COPY resume.pdf /usr/share/nginx/html
# Expose port 80 & 443 of the container
EXPOSE 80
EXPOSE 443
# Add internal health check function (extenral health check done via other container)
HEALTHCHECK --interval=30s --timeout=10s \
CMD curl -f http://localhost:80/resume.pdf --output /dev/null || exit 1
# Print to log that container loaded properly & start nginx server
CMD ["sh", "-c", "echo 'Container init successfully' && nginx -g 'daemon off;'"]