Push images to Harbor
Prerequisites
- The Harbor app needs to be activated.
- The App Platform cluster needs to be configured with certificates (such as Let's Encrypt production certificates).
- The Download the DOCKERCFG feature needs to be enabled by a platform administrator.
- Docker needs to be installed on your local (or other development) machine. See Install Docker Engine .
Push images to Harbor
To be able to push images to Harbor, you'll need a robot account with push permissions. Teams are offered the option to download the Docker config for their team's private registry in Harbor.
-
Log in to the App Platform Console and select Download DOCKERCFG in the left menu. This downloads the docker config file to your local machine.
-
When you have downloaded the docker config, copy the file to your
.Docker
folder.cp docker-team-labs.json $HOME/.Docker
-
Log in to the Harbor registry through the Docker CLI.
docker login harbor.<domain-of-your-cluster>
-
Build and tag your image.
docker build -t harbor.<your-domain>/team-<team-name>/<image-name>:<tag> <path to your Dockerfile>
-
Push the image to Harbor:
docker push harbor.<your-domain>/team-<team-name>/<image-name>:<tag>
Updated 10 days ago