Docker image security
As you have worked through the material in this book, you will have become increasingly familiar with images. These are a fundamental building block in the Docker ecosystem. An image is the combination of the filesystem and parameters that, when run by Docker, becomes your container.
Having made sure Docker itself is patched and secured, that our application code is robust, and that when we run the containers they will have limited privileges, we also want to ensure that the image itself is secure.
One of the benefits of Docker is that services such as Docker Hub allow us to share and reuse container images. However, we need to be careful that what we are downloading is secure and has not been uploaded by a malicious party:
You should always be cautious, however, even with legitimate/official websites.
There have been several cases in the past where malicious...