info:To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
---
# Reduce Container Registry data transfers **(FREE)**
Depending on the frequency with which images or tags are downloaded from the Container Registry,
data transfers can exceed the GitLab limit. This page offers several recommendations and tips for
reducing the amount of data you transfer with the Container Registry.
are downloaded from the Container Registry, data transfers can exceed the GitLab limit. This page
offers several recommendations and tips for reducing the amount of data you transfer with the
Container Registry.
## Check data transfer use
Transfer usage is not available within the GitLab UI. [GitLab-#350905](https://gitlab.com/gitlab-org/gitlab/-/issues/350905)
is the epic tracking the work to surface this information. In the interim, GitLab team members may reach out to customers that have
significantly exceeded their transfer limits to better understand their use case and offer ways to reduce data transfer
usage.
## Determine image size
Use these tools and techniques to determine your image's size:
-[Skopeo](https://github.com/containers/skopeo):
use Skopeo's `inspect` command to examine layer count and sizes through API calls. You can
therefore inspect this data prior to running `docker pull IMAGE`.
- Docker in CI: examine and record the image size when using GitLab CI prior to pushing an image
with Docker. For example:
```yaml
docker inspect "$CI_REGISTRY_IMAGE:$IMAGE_TAG" \
| awk '/"Size":([0-9]+)[,]?/{ printf "Final Image Size:%d\n", $2 }'
```
-[Dive](https://github.com/wagoodman/dive)
is a tool for exploring a Docker image, layer contents, and discovering ways to reduce its size.
## Reduce image size
### Use a smaller base image
Consider using a smaller base image, such as [Alpine Linux](https://alpinelinux.org/).
An Alpine image is around 5MB, which is several times smaller than popular base images such as
[Debian](https://hub.docker.com/_/debian).
If your application is distributed as a self-contained static binary, such as for Go applications,
you can also consider using Docker's [scratch](https://hub.docker.com/_/scratch/)
base image.
If you need to use a specific base image OS, look for `-slim` or `-minimal` variants, as this helps
to reduce the image size.
Also be mindful about the operating system packages you install on top of your base image. These can
add up to hundreds of megabytes. Try keeping the number of installed packages to the bare minimum.
[Multi-stage builds](#use-multi-stage-builds) can be a powerful ally in cleaning up transient build