<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://serverrental.store/index.php?action=history&amp;feed=atom&amp;title=Container_Registry_Setup</id>
	<title>Container Registry Setup - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://serverrental.store/index.php?action=history&amp;feed=atom&amp;title=Container_Registry_Setup"/>
	<link rel="alternate" type="text/html" href="https://serverrental.store/index.php?title=Container_Registry_Setup&amp;action=history"/>
	<updated>2026-04-15T02:40:29Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://serverrental.store/index.php?title=Container_Registry_Setup&amp;diff=5862&amp;oldid=prev</id>
		<title>Admin: New server guide</title>
		<link rel="alternate" type="text/html" href="https://serverrental.store/index.php?title=Container_Registry_Setup&amp;diff=5862&amp;oldid=prev"/>
		<updated>2026-04-14T20:01:04Z</updated>

		<summary type="html">&lt;p&gt;New server guide&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;# Container Registry Setup: Private Docker Registry with Harbor or GitLab&lt;br /&gt;
&lt;br /&gt;
Setting up a private container registry is crucial for managing your Docker images securely and efficiently. This guide will walk you through the process of establishing your own private Docker registry using either Harbor or the GitLab Container Registry. Both solutions offer robust features for storing, scanning, and distributing your container images.&lt;br /&gt;
&lt;br /&gt;
A **Docker image** is a lightweight, standalone, executable package of software that includes everything needed to run it: code, runtime, system tools, system libraries, and settings. A **container registry** is a centralized repository for storing and managing these Docker images.&lt;br /&gt;
&lt;br /&gt;
## Prerequisites&lt;br /&gt;
&lt;br /&gt;
Before you begin, ensure you have the following:&lt;br /&gt;
&lt;br /&gt;
*   A Linux server with root or sudo privileges. This server will host your registry.&lt;br /&gt;
*   Docker installed on your server. You can find installation instructions on the [official Docker documentation](https://docs.docker.com/engine/install/ubuntu/).&lt;br /&gt;
*   Basic understanding of Linux command-line operations.&lt;br /&gt;
*   (Optional) A domain name pointing to your server's IP address for easier access.&lt;br /&gt;
*   (Optional) If you plan to use Harbor, you will need Docker Compose installed. Instructions can be found on the [Docker Compose documentation](https://docs.docker.com/compose/install/).&lt;br /&gt;
&lt;br /&gt;
## Option 1: Setting Up Harbor&lt;br /&gt;
&lt;br /&gt;
Harbor is an open-source **container image registry** that stores, signs, and scans container images. It provides a web UI and Role-Based Access Control (RBAC) for managing access to your images.&lt;br /&gt;
&lt;br /&gt;
### 1. Install Docker Compose&lt;br /&gt;
&lt;br /&gt;
If you haven't already, install Docker Compose on your server.&lt;br /&gt;
&lt;br /&gt;
```bash&lt;br /&gt;
sudo apt-get update&lt;br /&gt;
sudo apt-get install docker-compose-plugin -y&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
### 2. Download Harbor&lt;br /&gt;
&lt;br /&gt;
Download the latest release of Harbor. You can find the latest release on the [Harbor GitHub releases page](https://github.com/goharbor/harbor/releases). Replace `v2.10.1` with the desired version.&lt;br /&gt;
&lt;br /&gt;
```bash&lt;br /&gt;
wget https://github.com/goharbor/harbor/releases/download/v2.10.1/harbor-offline-installer-v2.10.1.tar.gz&lt;br /&gt;
tar xzvf harbor-offline-installer-v2.10.1.tar.gz&lt;br /&gt;
cd harbor&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
### 3. Configure Harbor&lt;br /&gt;
&lt;br /&gt;
Edit the `harbor.yml` file to configure your Harbor instance.&lt;br /&gt;
&lt;br /&gt;
```bash&lt;br /&gt;
sudo nano harbor.yml&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
Key configurations to consider:&lt;br /&gt;
&lt;br /&gt;
*   `hostname`: Set this to your server's IP address or domain name (e.g., `registry.yourdomain.com`).&lt;br /&gt;
*   `http`: Configure ports for HTTP access.&lt;br /&gt;
*   `https`: Configure ports and certificates for HTTPS access (recommended for security).&lt;br /&gt;
*   `harbor_admin_password`: Set a strong password for the Harbor administrator.&lt;br /&gt;
&lt;br /&gt;
### 4. Install Harbor&lt;br /&gt;
&lt;br /&gt;
Run the Harbor installer script.&lt;br /&gt;
&lt;br /&gt;
```bash&lt;br /&gt;
sudo ./install.sh&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
This process can take several minutes. Once complete, you should be able to access Harbor through your web browser at `http://your_harbor_hostname` or `https://your_harbor_hostname`.&lt;br /&gt;
&lt;br /&gt;
### 5. Log in and Create Projects&lt;br /&gt;
&lt;br /&gt;
Log in to the Harbor web UI using the administrator credentials you set. You can then create projects to organize your images and manage user access.&lt;br /&gt;
&lt;br /&gt;
## Option 2: Setting Up GitLab Container Registry&lt;br /&gt;
&lt;br /&gt;
If you are already using GitLab for your code repositories, integrating its built-in container registry is a straightforward option.&lt;br /&gt;
&lt;br /&gt;
### 1. Enable Container Registry for Your Project&lt;br /&gt;
&lt;br /&gt;
Navigate to your GitLab project. In the left sidebar, go to **Package &amp;amp; Registry** &amp;gt; **Container Registry**. Click **Enable Container Registry**.&lt;br /&gt;
&lt;br /&gt;
### 2. Log in to the GitLab Container Registry&lt;br /&gt;
&lt;br /&gt;
You'll need to log in to the registry using your GitLab username and a Personal Access Token.&lt;br /&gt;
&lt;br /&gt;
First, create a Personal Access Token in GitLab:&lt;br /&gt;
1.  Go to your user **Settings** &amp;gt; **Access Tokens**.&lt;br /&gt;
2.  Give your token a name (e.g., `registry_access`) and select the `read_registry` and `write_registry` scopes.&lt;br /&gt;
3.  Click **Create personal access token**. **Copy the token immediately**, as you won't be able to see it again.&lt;br /&gt;
&lt;br /&gt;
Now, log in from your server's terminal:&lt;br /&gt;
&lt;br /&gt;
```bash&lt;br /&gt;
docker login your.gitlab.server.com&lt;br /&gt;
# Enter your GitLab username and the Personal Access Token as the password&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
Replace `your.gitlab.server.com` with your GitLab instance's domain.&lt;br /&gt;
&lt;br /&gt;
### 3. Tag and Push Your Docker Image&lt;br /&gt;
&lt;br /&gt;
Tag your Docker image with the GitLab registry path.&lt;br /&gt;
&lt;br /&gt;
```bash&lt;br /&gt;
docker tag your_image_name your.gitlab.server.com/your_group/your_project/your_image_name:tag&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
Then, push the image to the registry:&lt;br /&gt;
&lt;br /&gt;
```bash&lt;br /&gt;
docker push your.gitlab.server.com/your_group/your_project/your_image_name:tag&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
Your image is now stored in your GitLab project's container registry.&lt;br /&gt;
&lt;br /&gt;
## Using Your Private Registry&lt;br /&gt;
&lt;br /&gt;
Once your registry is set up, you can pull and push images to it from any machine that has Docker installed and appropriate access credentials.&lt;br /&gt;
&lt;br /&gt;
### Pulling an Image&lt;br /&gt;
&lt;br /&gt;
To pull an image from your private registry:&lt;br /&gt;
&lt;br /&gt;
```bash&lt;br /&gt;
docker pull your_registry_hostname/your_image_name:tag&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
### Pushing an Image&lt;br /&gt;
&lt;br /&gt;
To push an image to your private registry:&lt;br /&gt;
&lt;br /&gt;
```bash&lt;br /&gt;
docker tag local_image_name your_registry_hostname/your_image_name:tag&lt;br /&gt;
docker push your_registry_hostname/your_image_name:tag&lt;br /&gt;
```&lt;br /&gt;
&lt;br /&gt;
Remember to log in to your registry before pushing if you haven't already.&lt;br /&gt;
&lt;br /&gt;
## GPU Servers for Containerized Workloads&lt;br /&gt;
&lt;br /&gt;
For demanding containerized workloads, especially those involving machine learning inference or training, consider leveraging specialized **GPU servers**. These servers offer significantly accelerated processing capabilities compared to standard CPU servers. Immers Cloud provides GPU servers starting from $0.23/hr for inference to $4.74/hr for H200 GPUs, offering a scalable and cost-effective solution for compute-intensive tasks. You can explore their offerings at [Immers Cloud](https://en.immers.cloud/signup/r/20241007-8310688-334/).&lt;br /&gt;
&lt;br /&gt;
## Troubleshooting&lt;br /&gt;
&lt;br /&gt;
*   **Cannot connect to registry:**&lt;br /&gt;
    *   Ensure your firewall is configured to allow traffic on the registry's ports (e.g., 80, 443 for Harbor).&lt;br /&gt;
    *   Verify that the registry service is running. For Harbor, check `docker ps`. For GitLab, ensure your GitLab instance is accessible.&lt;br /&gt;
*   **Docker login failed:**&lt;br /&gt;
    *   Double-check your username and password (or Personal Access Token for GitLab).&lt;br /&gt;
    *   Ensure you are using the correct registry hostname.&lt;br /&gt;
*   **Harbor UI not loading:**&lt;br /&gt;
    *   Check the Harbor logs for errors: `sudo docker logs harbor-core`, `sudo docker logs harbor-jobservice`, `sudo docker logs harbor-portal`.&lt;br /&gt;
    *   Verify that Docker Compose is installed correctly and that Harbor's configuration in `harbor.yml` is valid.&lt;br /&gt;
&lt;br /&gt;
## Related Articles&lt;br /&gt;
&lt;br /&gt;
*   [[Docker Basics]]&lt;br /&gt;
*   [[Securing Docker]]&lt;br /&gt;
*   [[Introduction to Kubernetes]]&lt;br /&gt;
*   [[Continuous Integration and Continuous Deployment (CI/CD)]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Containerization]]&lt;br /&gt;
[[Category:DevOps]]&lt;br /&gt;
[[Category:Server Administration]]&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>