Is your container a gigabyte, for a hundred-line service?
Images built on full operating-system bases carry compilers, shells and package caches into production. Every deploy stores, pulls and starts all of it, on every node.
GreenCode researchers found that big container images waste energy.
GreenCode helps tackle this by mapping your running services and tracing energy and CO2e to the services that cause it. It shows which services run hot and which barely run at all. More on this.
Is your container a gigabyte, for a hundred-line service? Many container images start from a full operating system. They carry compilers, shells and download caches into production. Your service needs none of that to run. Every deploy stores it, pulls it and starts it, on every machine. That is storage, network traffic and start-up work, again and again. Here is the fix you can use today. Start from a slim base image, like alpine or distroless. GreenCode researchers found that big container images waste energy. The GreenCode Constitution notes these can be ten to a hundred times smaller. Build in stages, and copy only what the service needs to run. Leave test tools and build tools out of the final image. Get this right using GreenCode's Constitution skill for AI agents, and Docker's build guide. A smaller image means less to store, send and start. GreenCode helps tackle this by mapping your running services and the energy each one uses. It shows which services cause the energy use, and which barely run. That was GreenCode Tech Tip number eight. Follow for the next tip, and find more on greencode.ai/tech-tips.
Share this