4.4 Rebuild the images to include security patches

Information

https://docs.docker.com/userguide/dockerimages/

Solution

Follow the below steps to rebuild the images with security patches-Step 1- 'docker pull' all the base images (i.e., given your set of Dockerfiles, extract all images declared in 'FROM'instructions, and re-pull them to check for an updated version).
Step 2- Force a rebuild of each image with 'docker build --no-cache'.
Step 3- Restart all containers with the updated images.
Impact-
Rebuilding the images has to be done after upstream packages are available, otherwise re-pulling and rebuilding will do no good. When the affected packages are in the base image, it is necessary to pull it (and therefore rebuild). When the affected packages are in the downloaded packages, it is not necessary to pull the image; but nonetheless, in doubt, it is recommended to always follow this strict procedure and rebuild the entire image.
Note- If updated packages are not available and it is critical to install a security patch, live patching could be used.
Default Value-
By default, containers and images are not updated of their own.

See Also

https://workbench.cisecurity.org/files/516

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-7

Plugin: Unix

Control ID: 27653672e0100bbedd562d297db9b734b5d3dd5a4898250612729577609aa47a