🚢 Setup Harbor — Private Container Registry

Deploy Harbor on Ubuntu with Docker — an enterprise-grade open-source container registry with vulnerability scanning, role-based access control (RBAC), image replication, and a rich web UI. Host your own private Docker registry with security built in.

⚠️ This script is provided for demo and testing purposes only. Not intended for production use.

📦 Resources & Setup Scripts

Grab the automated bash script from GitHub to follow along with the video.

Automated install script — private container registry with scanning in one command.
View on GitHub

Quick Install:

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/dev/harbor/harbor-ubuntu.sh
chmod +x harbor-ubuntu.sh
sudo bash harbor-ubuntu.sh

Tutorial Steps

1 Download & Run the Script

The script installs Docker, downloads the official Harbor installer, generates a secure admin password, and starts all Harbor services. The generated password is displayed at the end — save it immediately.

wget https://raw.githubusercontent.com/mhmdali94/Docker/main/dev/harbor/harbor-ubuntu.sh
chmod +x harbor-ubuntu.sh
sudo bash harbor-ubuntu.sh

2 Access the Web UI & Login

Open your browser and navigate to the Harbor registry portal. Login with the auto-generated admin credentials:

http://<your-server-ip>:5080

Username: admin
Password: (shown at end of install script)

3 Create a Project

In the Harbor UI, go to Projects → New Project. Give it a name and set access control (public or private). Projects organize your image repositories and allow fine-grained RBAC for team members.

4 Push Your First Image

Login to the registry from your Docker client, then tag and push your image:

docker login <your-server-ip>:5080

docker tag myapp:latest <your-server-ip>:5080/my-project/myapp:latest
docker push <your-server-ip>:5080/my-project/myapp:latest

Ports Used

PortPurpose
5080Harbor Web UI & Registry API