8000 GitHub - hughware/dockerdockergo: Docker image push to Harbor registry open source tool on GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

hughware/dockerdockergo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

dockerdockergo automatic do it

Docker image push to Harbor. uploading multiple images from a tar file to a remote registry such as Harbor. Currently, the process involves loading the images from the tar file using docker load, tagging each image with the remote registry URL and project name using docker tag, and then pushing each image to the remote registry using docker push. This process can be time-consuming and cumbersome, especially when dealing with a large number of images.

need env

python3

python3 -V

use - init

chmod +x dockerdockergo
mv dockerdockergo /usr/bin
dockerdockergo -s
# Set up shell completion to autocomplete filenames when using the -f and -R parameters.

use - push a tar file images to harbor repository

dockerdockergo -h 192.168.200.30 -p k8s -f /root/image.tar
  • -h your harbor host
  • -p your harbor project
  • -f your tar file path

The -h option and the -p option, This information will be saved in the /root/.dockerdockergo.json file.

use - push all images to harbor repository

dockerdockergo -A
  • -A will push all docker images image

future

  • -R Replace image names in files in the specified directory
    now have utf8 issue
dockerdockergo -R /root/wokerdir 

We first use Harbor's API to get a list of images in the Harbor repository and store them in the harbor_images list. Then, when performing a replace operation, we use the lambda function to check if the matching text exists in the harbor_images list. If it does, the replacement operation is performed; otherwise, the original text is kept.

About

Docker image push to Harbor registry open source tool on GitHub

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0