Skip to content

ay-hooshan/docker-portable

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Using Docker Portable

How to use?

  1. docker should be installed on machine.
  2. edit docker config files (/etc/docker/daemon.json) in host machine and client machine:
    {
        "experimental": false,
        "insecure-registries": ["localhost:5000"]
    }
  3. run in terminal:
    sudo chmod u+x run.sh
    ./run.sh
  4. go to http://localhost:5000/v2/_catalog to see available images.
  5. how to pull image:
    sudo docker pull localhost:5000/<image-name>
  6. it's done!

instead of localhost you should consider your ip in private network. you should restart your docker after new configs.

Docs

  • pull registry image from Dockerub

    sudo docker pull registry
  • store pulled images on your machine in file for transfering

    docker save -o <save-location>/<file-name>.tar <image-name>
  • load image from file to machine

    docker load -i <image-file-path>.tar
  • run image to specific volume (for read and write)

    sudo docker run --rm -v ./regvol:/var/lib/registry --name hooshan-registry -p 5000:5000 registry
  • add image to registry:

    sudo docker tag <image-name> <your-registry-address>/<image-name>
    sudo docker push <your-registry-address>/<image-name>
  • remove all docker images:

    sudo docker rmi -f $(sudo docker images -aq)
  • remove all docker containers:

    sudo docker rm -vf $(sudo docker ps -aq)
    sudo docker container prune