Docker Hub:
Login to Docker Hub:
- Create Public Repository : Select Repositories -> Create Repository
- Select radio button: ‘Public‘ and specify name for public repository
- Click on ‘Create‘ button at the bottom
- For Private Repository: Click of radio button: Private and specify the name for repository.
- New Private and Public Repository will be created under ‘Repositories‘
Local Host Repository
—-
Docker Host Registry: localhost
- Download Docker Registry Image for Windows:
docker pull stefanscherer/registry-windows
- Create folder in C:\ drive
mkdir C:\registry
- Run Registry in the Container
docker run -d -p 5000:5000 --restart=always --name=host-registry -v C:\PrivateRegistry\registry:C:\registry stefanscherer/registry-windows
- Create Tag for Image
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ashmisinha/ashmi_sinha2019 visualizer-1809 6c3630785aa2 13 days ago 462MB
docker tag 6c3630785aa2 localhost:5000/registry:profile
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
ashmisinha/ashmi_sinha2019 visualizer-1809 6c3630785aa2 13 days ago 462MB
localhost:5000/registry visualizer 6c3630785aa2 13 days ago 462MB
- Push Image to Host Repository
docker push localhost:5000/registry:visualizer
The push refers to repository [localhost:5000/registry]
docker pull localhost:5000/registry:visualizer
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
localhost:5000/registry visualizer 6c3630785aa2 13 days ago 462MB
Localhost:5000/v2/_catalog
————–
Docker Host Registry: Host IP address
- Download Docker Registry Image for Windows:
docker pull stefanscherer/registry-windows
- Create folder in C:\ drive
mkdir C:\registry
- Run Registry in the Container
docker run -d -p 5000:5000 --restart=always --name=registry -v C:\registry:C:\registry stefanscherer/registry-windows
5bc3fc5491b214910ef16a730133505a11cbf0ef183025166648cce99452f701
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5bc3fc5491b2 stefanscherer/registry-windows “\\registry.exe serve…” 15 seconds ago Up 13 seconds 0.0.0.0:5000->5000/tcp registry
- Edit deamon.json file
notepad C:\ProgramData\docker\config\daemon.json
{
“insecure-registries”: [“10.0.0.11:5000”]
}
—
- Tag Docker image
docker tag 9dd14681e7ba 10.0.0.11:5000/registry:profile
- Push Docker Image to Host Repository
docker push 10.0.0.11:5000/registry:profile
The push refers to repository [10.0.0.11:5000/registry]
5bebd9248b2f: Pushed
8a56160f1cf1: Layer already exists
c8d2e547d6e5: Layer already exists
bb3159a57795: Pushed
23f3fc96266a: Skipped foreign layer
a7ba3db29ebb: Skipped foreign layer
profile: digest: sha256:723b7e0e8cd2517b2e6fa8f545cf11131635903013c7dd730a8fc7599aae810b size: 1942
Images are saved in C:\registry
Host Registry:
- Pull Image from Host Repository
docker pull 10.0.0.11:5000/registry:visual
Pull Docker from Remote Host Registry
Connect to the other Windows Server
IP: 10.0.0.12
- Edit deamon.json file
notepad C:\ProgramData\docker\config\daemon.json
{
“insecure-registries”: [“10.0.0.11:5000”]
}
- Pull Image from Host Registry on 10.0.0.11
docker pull 10.0.0.11:5000/registry:visual
visual: Pulling from registry
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
10.0.0.11:5000/registry visual 25d504423538 About an hour ago 1.33GB
—-
Docker Images Local Registry:
C:\ProgragData\docker\windowsfilter