Deploying a private Docker registry (Harbor).
To deploy the Docker private registry Harbor, you can follow these steps:
- To install Docker: First, you need to install the Docker engine on your server. Choose the appropriate Docker installation method based on your operating system. Make sure Docker is successfully installed and running.
- Download Harbor: Obtain the latest release code from Harbor’s GitHub repository. You can clone the code to your server using the following command:
git clone https://github.com/goharbor/harbor.git
- Set up Harbor: Navigate to the Harbor directory and configure Harbor based on your environment. You can modify various configuration options in the harbor.cfg file according to your needs, such as HTTP/HTTPS ports, database connections, storage locations, etc.
- Build Harbor: Construct Harbor using the following command:
make harbor
This will build Harbor’s binary files and Docker images, and save them in the ./build directory.
- Start Harbor: Use the following command to start Harbor:
./harbor start
This will start Harbor and run it on the port specified in your configuration file.
- The local server address is http://localhost.
After completing the steps above, your Docker private repository Harbor will be successfully deployed. You can use Harbor to store and manage your own Docker images.