Uploading a docker image

Uploading a docker image#

image_builder#

This assumes you have docker installed and are logged in via docker login, and you’ve already built the trusted docker image via a level 3 docker image task (typically on autoland).

  • Download+load the image:

    ./mach taskgraph load-image --task-id CDDoj06lSTSQ6qs5teT-CA
    

This will download public/image.tar.zst into docker.

decision images#

At the time of writing, there are 2 decision images: a general one and gecko’s. The former is built against the taskgraph repo, while gecko_decision is built in firefox They are only rebuilt whenever a change is detected by the respective decision task. The upstream taskgraph image is uploaded automatically on each taskgraph release. The gecko_decision image is uploaded periodically to DockerHub so that .taskcluster.yml can reference it. The procedure is similar to the one above.

  1. Load the image (see above)

  2. Tag:

    docker tag decision:latest mozillareleases/gecko_decision:$VERSION
    

where $VERSION is the contents of taskcluster/docker/decision/VERSION (which should have been updated ahead of the image build).

  1. Push the image:

    docker push mozillareleases/gecko_decision:$VERSION
    
  2. Land the change in-tree. See this example

Warning

If uploading an image that bumps the version of Mercurial being used, make sure to bump the checkout cache version. See Missing Mercurial features when Cloning the Repo for more information.

build-decision image#

Usually this will only be needed for re-pinnning the requirements, or minor changes to the image running hooks. If you don’t have a token, you will need to login to dockerhub and create a CLI token. The credentials for mozillareleases user is in sops.

  1. [optional] Re-pin the requirements:

    uv lock --upgrade
    
  2. Commit your changes, submit a PR, merge, wait for build-decision task to show up in the Github checks UI.

  3. Load the image (see above).

  4. Tag the image with your commit hash

    docker image tag build-decision mozillareleases/build-decision:86cc5419c32996b7d78422d7fed33ce79576f8eb

  5. Push the image to dockerhub

  6. Now you should be able to update the image URL in hg-push-template and cron-task-template