August 2017
Intermediate to advanced
278 pages
8h 53m
English
Because the standard NGINX image is perfect for more complex deployments, we're going to modify it to suit our needs. The great thing about Docker is that this process is very simple to do.
Firstly, we're going to create a Docker image definition file, which is called Dockerfile. This is what Docker uses to build an image, and it can reference an existing image as the base so that you don't have to reinvent the wheel. Here's our Dockerfile:
FROM nginx:latest # Configuration COPY default.conf /etc/nginx/conf.d/ # SSL Certificates and DH Key COPY dockerdemo.crt /etc/ssl/dockerdemo.crt COPY dockerdemo.key /etc/ssl/dockerdemo.key COPY dh4096.pem /etc/ssl/dh4096.pem # Symlink the logs to stdout and stderr RUN ln -sf /dev/stdout ...
Read now
Unlock full access