You are here

Creating a Local Docker Registry

To create a Docker Registry, execute the following CLI to download the stackbrew/registry image and run it.

$ sudo docker run -d -p 127.0.0.1:5000:5000 stackbrew/registry

Now, determine what the image id is for the Docker image you want to store within the registry:

$ sudo docker images
REPOSITORY           TAG                 IMAGE ID                 CREATED             VIRTUAL SIZE
icecoder                      latest               2c0c388cb568        2 days ago            229.4 MB
 
Now you can tag and push your image:
 
$ sudo docker tag 2c0c388cb568 localhost:5000/icecoder
$ sudo docker push localhost:5000/icecoder
 
Finally, you can pull your repository with:
 
$ sudo docker pull localhost:5000/icecoder
 

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer