Posts

Showing posts with the label registry

Push all the images from a local registry to DockerHub in one go

The other day, I wanted to push all the images from my local Docker registry to the Docker Hub but I didn't want to do it manually so I wrote this bash shell script: What the script's doing basically: 1. Get all the images in the local registry, assuming the image's name is in  this form:  local.registry.domain/branch/image_name:my-tag 2. For each image, create a new tag that match DockerHub's requirement which is: docker_hub_username/my-tag 3. Then push that image into Docker Hub Here is my Docker Hub repositories after finish the PUSH, you can have a look: https://hub.docker.com/u/dangtrinhnt/ Profit!

Pulling all images from a private docker registry

I couldn't find any command that help pulling all the docker images from a private registry so I wrote it myself: Modify the script with your information and run: $ bash pull_all_from_private_docker_registry.sh

How to list all the images on a Docker Registry

Pretty easy: * Normally with a insecure private Docker Registry you would do: curl http://<the domain>:<the port if not 80, usually it's 5000>/v2/_catalog * In a secure private Docker Registry: curl https://<user_name>:<password>@<the domain>/v2/_catalog The result will be something like: {"repositories":["anda/centos-source-aodh-api","anda/centos-source-aodh-base","anda/centos-source-aodh-evaluator","anda/centos-source-aodh-expirer","anda/centos-source-aodh-listener","anda/centos-source-aodh-notifier","anda/centos-source-barbican-api","anda/centos-source-barbican-base","anda/centos-source-barbican-keystone-listener","anda/centos-source-barbican-worker","anda/centos-source-base","anda/centos-source-bifrost-base","anda/centos-source-bifrost-deploy","anda/centos-source-blazar-api","anda/cen...

How to see Windows Product Key in Windows 7 (tested)

To see your Windows 7 machine's product key you can run this script (as an Administrator): Quite handy huh?

How to export Environment Variables in Windows

There is a way to export and import Environment Variables in Windows. That is export the registry keys which store those variables. For System Variables, open registry editor (cmd > regedit): HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment For User Variables: HKEY_CURRENT_USER\Environment Then you can import these registry keys into other windows machines.