You can run docker push (Docker) or ctr push (containerd) on the server where the container engine client is installed to push an image to SWR.
The following walks you through the steps of uploading an image to SWR through the client by taking the nginx:v1 image built in Basics of Docker as an example. The procedure is as follows:
to copy the login command.The message "Login Succeeded" will be displayed upon a successful login.
docker tag [Image name 1:tag 1] [Image repository address]/[Organization name]/[Image name 2:tag 2]
In the preceding command:
Example:
docker tag nginx:v1 swr.ru-moscow-1.hc.cloud.ru/group/nginx:v1
docker push [Image repository address]/[Organization name]/[Image name 2:tag 2]
Example:
docker push swr.ru-moscow-1.hc.cloud.ru/group/nginx:v1
The following information will be returned upon a successful push:
6d6b9812c8ae: Pushed695da0025de6: Pushedfe4c16cbf7a4: Pushedv1: digest: sha256:eb7e3bbd8e3040efa71d9c2cacfa12a8e39c6b2ccd15eac12bdc49e0b66cee63 size: 948
To view the pushed image, refresh the My Images page.
The command is only valid for six hours after it is generated. For details about how to obtain a long-term upload command, see Obtaining a Long-Term Valid Login Command.
