docker
should be installed on machine.- edit docker config files (
/etc/docker/daemon.json
) in host machine and client machine:{ "experimental": false, "insecure-registries": ["localhost:5000"] }
- run in terminal:
sudo chmod u+x run.sh ./run.sh
- go to
http://localhost:5000/v2/_catalog
to see available images. - how to pull image:
sudo docker pull localhost:5000/<image-name>
- it's done!
instead of
localhost
you should consider your ip in private network. you should restart your docker after new configs.
-
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