To be able to push an image to a project in Harbor you need to log in via the terminal. For this you will need your Deltares email address and cli secret. The CLI secret can be found in the Harbor web interface (https://containers.deltares.nl). After logging in you will be able to retrieve your cli secret by clicking on your name in the top right corner and going to "User Profile".
After obtaining your CLI secret you can open a terminal and entering the following command:
docker login -u <<deltares_email>> -p <<cli_secret>> https://containers.deltares.nl
When the log in is succesful you can push to Harbor repositories you have access to using the following commands.
For Docker:
docker tag <<local_container_name>> https://containers.deltares.nl/<<Harbor Project name>>/<<Image Repository Name>>:<<Tag>>
docker push https://containers.deltares.nl/<<Harbor Project name>>/<<Image Repository Name>>:<<Tag>>
For Singularity:
singularity push <<local_container_name>>.sif oras://containers.deltares.nl/<<Harbor Project name>>/<<Image Repository Name>>:<<Tag>>
1 Comment
René van Klink
Pulling/pushing using apptainer required a separate login command for me:
apptainer remote login --username <<deltares_email>> oras://containers.deltares.nl
Apptainer asks you to enter your password/token interactively. Entering your Harbor CLI secret here works