Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate base container images away from Docker Hub #9045

Open
JamieMagee opened this issue Feb 13, 2024 · 2 comments
Open

Migrate base container images away from Docker Hub #9045

JamieMagee opened this issue Feb 13, 2024 · 2 comments

Comments

@JamieMagee
Copy link
Contributor

JamieMagee commented Feb 13, 2024

Code improvement description

A lot of our base container images use images from Docker Hub. Unfortunately, Docker Hub has quite restrictive rate limits1 and we frequently hit them when running tests2.

Copying the base images that we rely on, on a regular basis, into a container registry that we have more control of, like GitHub Container Registry or an Azure Container Registry instance, would prevent flaky test failures due to rate limits.

There are two main concerns I have about an approach like this:

  • Currently we rely a lot on mutable container tags and implicitly get updates i.e. python:3.9 is mutable. If we start copying images into our own registry, we'd have to take care to stay on top of any updates to tags we rely on
  • Do the licenses of the container images allow for us to copy them to our own registry?

An alternative to this would be to use something like docker/login-action to authenticate with Docker Hub and get a higher rate limit. But that requires us to manage credentials.

Footnotes

  1. https://docs.docker.com/docker-hub/download-rate-limit/

  2. https://github.com/dependabot/dependabot-core/pull/9042#issuecomment-1942050753

@JamieMagee
Copy link
Contributor Author

#9044 is related, as it makes any dependencies on Docker Hub explicit instead of implicit.

@JamieMagee
Copy link
Contributor Author

Here's a list of the dependencies we have:

All of them are either based on Debian 12 (Bookworm) or Ubuntu 22.04 (Jammy).

Another alternative that I didn't mention in the initial post is migrating to the Microsoft Container Registry, and a Linux distribution hosted there, such as Mariner. There are already equivalent base images for most of the Ubuntu/Debian images we currently rely on:

The only equivalent that is missing in a golang base image. Golang is packaged for Mariner1, so it may just be a matter of requesting a base image be created

Footnotes

  1. https://github.com/microsoft/azurelinux/tree/2.0/SPECS/golang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant