Created
April 24, 2022 15:55
-
-
Save brian-lim-42/f7aa25b9a064536bf2cf45cfea50841d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# nginx simple Dockerfile | |
# | |
# Pull base image. | |
FROM ubuntu | |
# Install Nginx. | |
RUN \ | |
apt-get update && \ | |
apt-get install -y nginx && \ | |
rm -rf /var/lib/apt/lists/* && \ | |
echo "\ndaemon off;" >> /etc/nginx/nginx.conf && \ | |
chown -R www-data:www-data /var/lib/nginx | |
# Define mountable directories. | |
VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/etc/nginx/conf.d","/var/log/nginx", "/var/www/html"] | |
# Define working directory. | |
WORKDIR /etc/nginx | |
# Define default command. | |
CMD ["nginx"] | |
# Expose ports. | |
EXPOSE 80 | |
# | |
# nginx simple Dockerfile | |
# | |
# Pull base image. | |
FROM ubuntu... | |
# Define default command. | |
CMD ["nginx"] | |
# Expose ports. | |
EXPOSE 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment