Example Dockerfiles

############################################################
# Dockerfile to build Nginx Installed Containers
# Based on Alpine Linux -- https://alpinelinux.org
############################################################

# Set the base image to Alpine
FROM alpine

# File Author / Maintainer
MAINTAINER Nick Boltjes

# Install Nginx
RUN apk add --no-cache nginx

# Remove the default Nginx configuration file
RUN rm -v /etc/nginx/nginx.conf

# Copy a configuration file from the current directory
ADD nginx.conf /etc/nginx/

# symlink log output to stdout so we can monitor it with 'docker logs'
RUN ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log

# Expose ports
EXPOSE 80 443

# Set the default command to execute
# when creating a new container
ENTRYPOINT nginx