When using Docker to run applications, security is a major concern, but it can sometimes be easy to forget as we focus first on functionality. This doesn’t need to be the case, as AWS Elastic Container Registry (ECR) can now be setup to automatically scan images on push, and provide feedback on any vulnerabilities that need to be addressed.
ECR uses the Common Vulnerabilities and Exposures (CVEs) database from the open-source Clair project. Clair performs static scanning of Docker images, meaning that it happens prior to deployment, as opposed to _dynamic scanning, _which happens at runtime.
Clair analyzes each layer of the Docker image and then returns vulnerabilities that might affect the image. These vulnerabilities are then shown to us in the AWS Console or we can fetch them via the AWS Command Line Interface (CLI).
Additionally, ECR offers these features:
Let’s start off by scanning everyone’s favorite base image, Alpine Linux. It’s a lightweight Linux distribution that is used as a base image for many popular applications in Docker. It’s also one of the official approved Docker images. ✅
At the time of writing version 3.11 of Alpine, it was not compatible with ECR image scanning, so we’ll use version 3.10.
#docker #aws #kubernetes #secuirty #ecr