December 2017
Intermediate to advanced
468 pages
13h 12m
English
When building container images, we should include only the services that are absolutely essential for the application the container will host. Anything extra wastes resources and widens the potential attack vector that could ultimately lead to security problems. For example, it is not good to run an SSH server inside the container because we can use the Docker exec call to interact with the containerized application. The related suggestions here are to create a new directory and include the Dockerfile and other relevant files in that directory. Also consider using .dockerignore to remove any logs, source code, and so on before creating the image. Furthermore, make it a habit to remove any downloaded artifacts after ...