- Hands-On Kubernetes on Windows
- Piotr Tylenda
- 472字
- 2021-06-24 16:54:04
Using a custom local registry
When it comes to choosing storage for your images, you are not limited to using the default Docker Hub. In fact, in most cases, when you are running production code, you may want to use a locally hosted Docker Registry, which is an open source, highly scalable application for storing and distributing Docker images. You should consider this solution in the following situations:
- You want to distribute Docker images in an isolated network
- You need strict control where the images are stored and distributed
- You would like to compliment your CI/CD workflow to enable faster and more scalable delivery of images
Detailed information about the deployment of Docker Registry can be found in the official documentation: https://docs.docker.com/registry/deploying/.
In order to use a custom image registry, all you need to do is specify the registry address (and port, if needed) in the image name when using pull or push commands, for example, localregistry:5000/ptylenda/test-application:1.0.0, where localregistry:5000 is the domain name and port of a locally hosted Docker registry. In fact, you have already used a custom Docker image registry when you pulled images for your demonstration Windows IIS application: mcr.microsoft.com/windows/servercore/iis:windowsservercore-1903. The mcr.microsoft.com registry is the MCR, which is the official registry for Microsoft Published images. The main difference between other public registries and MCR is that it is tightly integrated with Docker Hub and leverages its UI for providing a browsable catalog of images. Docker Engine is capable of using any system that exposes the Docker Registry HTTP API (https://docs.docker.com/registry/spec/api/) as a container image registry.
Apart from hosting your own local image registry, there are a couple of cloud-based alternatives that provide private image registries:
- Azure Container Registry (ACR) https://azure.microsoft.com/en-in/services/container-registry/). We will cover this registry in the next section as part of a demonstration of how to use cloud hosting for container builds.
- Docker Enterprise and its Docker Trusted Registry (https://www.docker.com/products/image-registry).
- IBM Cloud Container Registry (https://www.ibm.com/cloud/container-registry).
- Google Cloud Container Registry (https://cloud.google.com/container-registry/).
- RedHat Quay.io and Quay Enterprise (https://quay.io). Quay is an interesting solution if you would like to host not only the registry but also the build automation and web catalog on-premises, similar to Docker Hub.
In the next section, you will learn how to use Docker Hub to automate Docker image builds and how to host your own registry using ACR.
- Designing Machine Learning Systems with Python
- Getting Started with React
- 零基礎(chǔ)學(xué)C++程序設(shè)計
- Android開發(fā)精要
- C語言程序設(shè)計基礎(chǔ)與實驗指導(dǎo)
- Java編程指南:基礎(chǔ)知識、類庫應(yīng)用及案例設(shè)計
- Network Automation Cookbook
- 匯編語言程序設(shè)計(第2版)
- Mastering C# Concurrency
- Internet of Things with Intel Galileo
- Mastering AndEngine Game Development
- Java編程技術(shù)與項目實戰(zhàn)(第2版)
- 軟件品質(zhì)之完美管理:實戰(zhàn)經(jīng)典
- 區(qū)塊鏈技術(shù)進階與實戰(zhàn)(第2版)
- Emotional Intelligence for IT Professionals