Pre-defined environment

Prepare required Docker environments

Pre-request

1. Download and install the required packages for Docker

2. Setup Docker environment and Shoot!

Pre-request

This procedure follows the example on Openssl certificate creation on k8s official document

On master01.airgapped.org

2. Start private registry

3. Push your first image to private registry and verify

On master01.airgapped.org, At this point, you have:

Now you have to:

  1. Tag cached image with new registry path which leads to registry.airgapped.org

     $ docker tag docker.io/registry:latest registry.airgapped.org/registry:latest
     $ docker images
     REPOSITORY                       TAG                 IMAGE ID            CREATED             SIZE
     registry.airgapped.org/registry   latest              177391bcf802        2 weeks ago         33.26 MB
     docker.io/registry               latest              177391bcf802        2 weeks ago         33.26 MB
    
  2. Push newly taged image to registry.airgapped.org
     docker push registry.airgapped.org/registry
    
  3. Remove cached image on local docker, newly tag registry.airgapped.org/registry:latest
     docker rmi registry.airgapped.org/registry:latest
     $ docker images
     REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
     docker.io/registry   latest              177391bcf802        2 weeks ago         33.26 MB
    
  4. Pull image registry from registry.airgapped.org

     $ docker pull registry.airgapped.org/registry
     Using default tag: latest
     Trying to pull repository registry.airgapped.org/registry ...
     latest: Pulling from registry.airgapped.org/registry
     Digest: sha256:e82c444f6275eaca07889d471943668ac17fd03ea8d863289a54c199ed216332
    
     $ docker images
     REPOSITORY                       TAG                 IMAGE ID            CREATED             SIZE
     docker.io/registry               latest              177391bcf802        2 weeks ago         33.26 MB
     registry.airgapped.org/registry   latest              177391bcf802        2 weeks ago         33.26 MB
    
    
Now, you have a working and verified private registry!

For securer docker access, you shall follow the instruction list on Restricting access.