You are on page 1of 6

Docker Registry

Docker Registry

1. What is Docker Registry


2. Types of Docker registry - Community & User
based
3. Images backup and images sharing
4. tar backup and transfer
5. use case of docker registry
Images backup

1. Docker build -t centos:apache .


2. Docker images
3. Docker save centos:apache > apache.tar
4. Transfer at desired docker host
5. Docker load -i apache.tar
6. Docker images
7. Limitation of Tar backup
Push images into Registry

1. Pull and Push images into Docker registry


2. Create account on Docker hub and sign in
3. Create Repository - Public & Private
4. Docker tag local-image:tag docker.io/dockerID/newrepo-name:tag
5. Docker push docker.io/dockerID/newrepo-name:tag
6. Docker login --username “username”( Password based token )
7. token based authentication on docker hub → User name -> Account setting ->
security -> access new token
8. Docker logout
Own registry server

1. Installation of offline own registry server


2. Create a standalone server ( 1GB RAM/1VCPU/15GB)
3. Yum install docker-distribution -y
4. Systemctl start docker-distribution
5. Systemctl enable docker-distribution
6. netstat -tnlp | grep -w 5000
7. Document of images → /var/lib/registry
8. Configuration files -> /etc/docker-distribution/registry/config.yml
Push images into own registry

1. Docker tag centos:7 IP:5000/repos:7


2. Docker images
3. Docker push image-name
4. HTTPS push transfer to HTTP push -
Vim /etc/docker/daemon.json
{ “insecure-registries”:[“registry-server-ip:5000”] }
systemctl reload docker
5. Container based registry - docker pull registry:2

You might also like