Skip to content

Instantly share code, notes, and snippets.

@CalvinHartwell
Created January 23, 2018 01:38
Show Gist options
  • Select an option

  • Save CalvinHartwell/af9d29df82b4212f49e91dd33c359f6f to your computer and use it in GitHub Desktop.

Select an option

Save CalvinHartwell/af9d29df82b4212f49e91dd33c359f6f to your computer and use it in GitHub Desktop.
simple ubuntu nginx container
FROM ubuntu
# Set the file maintainer (your name - the file's author)
MAINTAINER CALVIN
# 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
# Copy the index.html
COPY index.html /usr/share/nginx/html/index.html
CMD ["nginx"]
# Expose ports.
EXPOSE 80
EXPOSE 443
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment