Uploading and Downloading a Docker Image on the Client
CodeArts Artifact can connect to local Docker clients. You may upload your private images from your local Docker client to self-hosted repos and share them with others, who can download these Docker images through their clients.
Docker Image
Docker artifacts refer to container images built and published using Docker. Docker images contain all dependencies and configurations required for running applications, ensuring portability and consistent behavior across environments.
Constraints
The repository password for a self-hosted repo is account-specific. If you are prompted for a password while using a different account, download the configuration file from the repository's Tutorial tab to obtain it.
Prerequisites
- You have installed the Docker client.
- You have created a Docker registry.
- You have the Download/View permission on the current registry. For details about how to obtain this permission, see Configuring Repository Permissions.
Uploading a Docker Image from the Client
- Access self-hosted repos using your Huawei Cloud account.
- Select the target Docker registry from the self-hosted repo page and click Tutorial on the right of the page.
- In the displayed dialog box, click Download Configuration File to download the config.json file.
- Obtain {username} and {password} from the downloaded file.

- Run the following command on your local client to log in to the Docker registry.
docker login {url} -u ${username} -p ${password}Variables in the preceding command are as follows:
- Load a local Docker image.
docker load -i registry.k8s.io_pause.tar

- Query the name and version of a local Docker image.
docker images

- Run the following command on your local client to package an image.
docker tag ${image_name1}:${image_version1} {url}/${image_name2}:${image_version2}Variables in the preceding command are as follows:
- image_name1: name of the local Docker image. This is the image name obtained in 7.
- image_version1: version of the local Docker image. This is the image version number obtained in 7.
- url: repository address, as shown in the following figure:

- image_name2: You can name the uploaded image. The image name is displayed in the image list of the Docker registry.
- image_version2: You can set the version of the uploaded image.
- Run the following command on the local client to upload the Docker image to the self-hosted repo.
docker push {url}/${image_name}:${image_version}Variables in the preceding command are as follows:
- Check the uploaded image in the Docker registry.
Downloading a Docker Image to the Client
- Access self-hosted repos using your Huawei Cloud account.
- Select the target Docker registry on the self-hosted repo page.
- Click Tutorial on the right of the page.
- In the displayed dialog box, click Download Configuration File to download the config.json file.
- Obtain {username} and {password} from the downloaded file.
- Run the following command on your local client to log in to the Docker registry.
docker login {url} -u ${username} -p ${password}Variables in the preceding command are as follows:
- Run the following command on your local client to download the Docker image.
docker pull {url}/${image_name}:${image_version}url: repository address, as shown in the following figure:

- image_name: image name.
- image_version: image version.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot
