Upload third-party image to image repository ΒΆ
This how-to guide will show you how to upload a Docker image to your team's image repository.
Prerequisites ΒΆ
- Nais CLI installed.
- A Docker runtime installed and running on your machine
Log into Nais ΒΆ
bash
nais loginRegister the Docker registry ΒΆ
bash
gcloud auth configure-docker europe-north1-docker.pkg.devEnsure you have the image locally ΒΆ
Ensure the desired image is available on your machine by pulling it from its source or building it locally. For example:
bash
docker pull repository/my-image:tag --platform linux/amd64Specify the platform
Note that we are adding the --platform linux/amd64 flag to ensure that the image we are pulling is compatible with the Nais platform.
By default the architecture of the image will be the same as the host machine, which might not work.
Locate the image repository URL ΒΆ
Find the image repository URL on the settings page in the Nais console
https://console.nav.cloud.nais.io/team/<MY-TEAM>/settings
The URL will be on this format:
europe-north1-docker.pkg.dev/nais-management-<ID>/<MY-TEAM>
Tag the image ΒΆ
bash
docker tag repository/my-image:tag europe-north1-docker.pkg.dev/nais-management-<ID>/<MY-TEAM>/my-image:tagPush the image ΒΆ
bash
docker push europe-north1-docker.pkg.dev/nais-management-<ID>/<MY-TEAM>/my-image:tag