|
1 | | -# Harbor |
| 1 | +# Harbor Registry — Push Image Guide |
2 | 2 |
|
3 | | -Harbor is an open source registry that secures artifacts with policies and role-based access control, ensures images are scanned and free from vulnerabilities. |
| 3 | +## Overview |
4 | 4 |
|
5 | | -This is a small guide for quick access to harbor docker image storage. |
| 5 | +[Harbor](https://goharbor.io/) is an open-source container registry that provides: |
6 | 6 |
|
7 | | -## harbor instance deployment |
8 | | -TODO |
| 7 | +- **Role-Based Access Control (RBAC)** |
| 8 | +- **Integration with SSO / OIDC** (via Keycloak) |
| 9 | +- **Vulnerability scanning** and secure artifact storage |
| 10 | + |
| 11 | +This guide shows you how to get started with Harbor, create your account via SSO, and push Docker images to your assigned project. |
| 12 | + |
| 13 | +--- |
| 14 | + |
| 15 | +## 1. Getting a Harbor Account |
| 16 | + |
| 17 | +1. Go to the **Harbor Web Interface**: |
| 18 | + [https://harbor.<your_domain>](https://harbor.<your_domain>) |
| 19 | + |
| 20 | +2. **Log in via SSO** (Keycloak OIDC) using your CyVerse Austria credentials. |
9 | 21 |
|
10 | | -## harbor account |
11 | 22 |  |
12 | | -To have a Harbor account created, you need to login via SSO, which in our case is configured through Keycloak-OIDC. |
13 | 23 |
|
14 | | -Once you login via SSO, you will have a project and role automatically assigned. |
| 24 | +3. After your first login, your **Harbor account** is automatically provisioned: |
| 25 | + - You’ll automatically get your designated **role** within that project (e.g. *Developer*, *Maintainer*). |
| 26 | +--- |
15 | 27 |
|
| 28 | +## 2. Docker Login & Using Harbor |
16 | 29 |
|
17 | | -## docker login and push |
18 | | -Once your account is created and configured in a project, you will need to use it to authenticate via docker. |
| 30 | +Once your account is ready, follow these steps to log in and push your images. |
19 | 31 |
|
20 | | -``` |
| 32 | +### Step 1: Log in via Docker CLI |
| 33 | + |
| 34 | +```bash |
21 | 35 | docker login harbor.<your_domain> |
22 | 36 | ``` |
23 | 37 |
|
24 | | - |
25 | | -After this you will be prompted to enter Username and password. In the **Harbor** browser page go to your user (top right) -> User profile. The password would be the **CLI Secret**. Copy that to clipboard. |
| 38 | +You’ll be prompted for **username** and **password**. |
26 | 39 |
|
27 | | -Then: |
| 40 | +* Username:** Your Harbor username (same as your Keycloak username) |
28 | 41 |
|
29 | | -``` |
| 42 | +* **Password:** Use your CLI secret (not your Keycloak password) |
| 43 | + |
| 44 | +To find your CLI secret: |
| 45 | + |
| 46 | +* Log into the Harbor UI |
| 47 | + |
| 48 | +* Click your **user profile** (top right corner) |
| 49 | + |
| 50 | +* Go to User Profile → **CLI Secret** |
| 51 | + |
| 52 | +* Copy and use it when prompted for your password |
| 53 | + |
| 54 | + |
| 55 | +### Step 2: Tag Your Image |
| 56 | + |
| 57 | +Replace the placeholders with your project and image name: |
| 58 | + |
| 59 | +```bash |
30 | 60 | docker tag <your_image> harbor.<your_domain>/<your_project>/<image_name>:<tag> |
31 | 61 | ``` |
32 | 62 |
|
33 | | -``` |
| 63 | +### Step 3: Push Your Image |
| 64 | +```bash |
34 | 65 | docker push harbor.<your_domain>/<your_project>/<image_name>:<tag> |
35 | 66 | ``` |
36 | | - |
37 | | -Check in the Harbor website whether your image was pushed correctly to the desired project. |
38 | | - |
39 | | -**Note**: Additional docs for docker authentication https://docs.docker.com/desktop/setup/sign-in/ |
|
0 commit comments