Within our Dockerfile, we define a number of steps to build the image:
- FROM: This defines our starter image; for this recipe, we used nginx:latest. Rather than build the image from scratch, we simply start with the official NGINX image. If you want to manually install your own build, you could start with a base Linux, such as Debian or Alpine.
- COPY: In order to make the files part of the image, we can copy them as part of the build process. For this image, we've copied over our NGINX configuration file as well as the SSL certificates. If the files exist in the base image, they will simply be overwritten.
- RUN: We can issue commands within the build. In this instance, we symlink the default log files through to /dev/stdout ...