Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to build a local docker repo?

Shulou Source: shulou.com Published: 2022-06-03 05:57:38 09月15日 Update

Log in with docker's id, and then you can get a 4-hour virtual machine, which is enough for the experiment

Come on, next repo managed container

# download registry image

Docker run-d-p 5000UR 5000-restart always-name register registry:2

Succeed in seconds

# download hello-world image

Docker pull hello-world

# all right

Docker ps-a

# tag & push image to local repostory

Docker tag hello-world localhost:5000/hello-world

Docker push localhost:5000/hello-world

# go to the directory and see image

Docker exec-it register / bin/sh

Goto / var/lib/registry/, you can found all the images

# remove docker image

Docker rmi hello-world

# download images from local repo, I feel like I have enough to eat.

Docker pull localhost:5000/hello-world

Docker images

Found a web ui for docker repo

Https://hub.docker.com/r/konradkleine/docker-registry-frontend

Docker run\

-d\

-e ENV_DOCKER_REGISTRY_HOST=registry\

-e ENV_DOCKER_REGISTRY_PORT=5000\

-p 8080VOG 80\

-- link register:registry\

Konradkleine/docker-registry-frontend:v2

# Please note that register is local repo,registry and web ui

# start downloading as soon as your eyes are closed

# docker rmi konradkleine/docker-registry-frontend:v2

Go to the interface to find the port from mapping. 8080 is the port of docker repo. Web ui,5000 is the port of repo.

Found the hello world image

# tag & push a new image updated v2 to v3

Docker tag konradkleine/docker-registry-frontend:v2 localhost:5000/konradkleine/docker-registry-frontend:v3

Docker push localhost:5000/konradkleine/docker-registry-frontend:v3

Refresh repo web ui

Tags: Port success container hour that is feeling interface directory eye experiment hosting update login Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Apple Linux MariaDB OPPO Reno macOS