Integrating DockerSlim container minify step on Cloud Build
Whenever we are dealing with containers, the general recommendation is to make them leaner, smaller, faster, and secure. The smaller the container image is, the faster your application will spin up for the first time, and the faster it will scale.
But more on this topic, the industry weighs the benefits of having a smaller container, to be more secure as reduces the available attack surface.
On serverless container environments like Cloud Run, having a leaner container image helps to reduce cold starts.
As more users run their application on Cloud Run, we at REEA.net were interested to explore getting DockerSlim into our build pipeline to create smaller and secure containers.
I have provided valuable feedback to the docker-slim team to make sure the tool can be used as part of a Cloud Build job. Starting with the 1.34.4
release Cloud Build integration is supported as they enhanced the IPC communications.
What is DockerSlim?
docker-slim is a tool that provides a set of commands (build
, xray
, lint
and others) to reduce the size and optimize your containers. It makes your containers better, smaller, and more secure by using various techniques.
You don’t need to do any changes to…