Using Harbor — Student Guide

This procedure describes how to use Harbor, a Docker and Podman image registry.

1. Access the Ecloud Portal

Go to the ECloud portal:
🔗 https://im2ag-harbor.univ-grenoble-alpes.fr

Log in with your Agalan username and password:
LoginHarbor

You will land on your projects page.

Dashboard

You can create a project by clicking New Project
and specifying the visibility of your repository.

NewProject

Note:

When a project is set to public, anyone is allowed to read the repositories under that project, and users do not need to run “docker login” before pulling images from this project.

Once the project is created, click its name to access its Repositories.

repository

Before you can push images to this registry, it is recommended to create a Robot Account to interact with this repository.

CreateRobot

You will obtain a generated username and password for your robot.

CreateRobot

You can export this password to a file.

For your information, if you lose the secret file, you can regenerate a password by selecting the robot account and clicking Actions → Refresh Secret.
You can then either refresh or set a password of your choice.

RefreshMDP

⚠️ Important note: the login contains the special character $.
Be sure to escape it.
If you do not escape this character, the shell may replace part of your login with an empty string!

RemarqueLogin

At this stage, you can log in, push, and pull images from your repository.

Log in to the registry:

There are several ways to authenticate to your repository. We will use a simple command-line method.

1- Make sure you are connected to the university network — via VPN if you are on Wi‑Fi.
2- Use the following command

echo 'mot de passe' | docker login -u  'login' --password-stdin https://im2ag-harbor.univ-grenoble-alpes.fr

LoginOK

From the Repositories tab, click the Push Command button.
You will find a command template to run.

PushCommands

Complete Example: Pushing an Image to Harbor

  1. Build the Docker image

From the folder containing the Dockerfile:

docker build -t myapp .

This builds a local image called myapp:latest
DockerBuild

  1. Tag the image with the Harbor URL

To be able to push it to Harbor, tag it with the full path to the registry and project:

docker tag myapp:latest im2ag-harbor.univ-grenoble-alpes.fr/test-repo/myapp:v1

Here, test-repo is the project name in Harbor and v1 is the chosen tag.
dockerTag

  1. Push the image to Harbor
docker push im2ag-harbor.univ-grenoble-alpes.fr/test-repo/myapp:v1

The various layers are uploaded to the registry.
DockerPush

  1. Check in the Harbor interface

Once the push is complete, log in to the Harbor web interface.
You will see the image myapp with tag v1 in the Artifacts tab:
Depot

imagePoussee

  1. Run the image from Harbor

If the image is not available locally, Docker will automatically download it from Harbor at runtime.

dockerRun