Create docker-compose.yml and fill in the following content version: '3' services: registry: restart: always image: registry:2 ports: - 5000:5000 environment: REGISTRY_HTTP_TLS_CERTIFICATE: /certs/registry.crt REGISTRY_HTTP_TLS_KEY: /certs/registry.key REGISTRY_AUTH: htpasswd REGISTRY_AUTH_HTPASSWD_PATH: /auth/htpasswd REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm volumes: - /home/docker/registry:/var/lib/registry - /home/registry/cert:/certs - /home/registry/auth:/auth registry-ui: image: konradkleine/docker-registry-frontend:v2 restart: always environment: -ENV_DOCKER_REGISTRY_HOST=registry - ENV_DOCKER_REGISTRY_PORT=5000 - ENV_DOCKER_REGISTRY_USE_SSL=1 ports: - "5001:80" Among them, REGISTRY_HTTP_TLS_CERTIFICATE is the SSL certificate. This certificate can be generated by yourself or applied for on websites such as Alibaba Cloud. Since it is a private warehouse, the author recommends using a private certificate Copy this file and execute the docker-compose up command Create a login user and password docker run --entrypoint htpasswd registry:2 -Bbn username password >> /home/registry/auth/htpasswd Open the browser, enter http://localhost ip:5001 and see the following page, which means the access is successful. Click on both repositories and a username and password input box will pop up. Enter the username and password created above to view all the images in the repository. This is the end of this article about the steps to quickly build a docker private warehouse with docker-compose. For more information about building a docker private warehouse with docker compose, please search for previous articles on 123WORDPRESS.COM or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: XHTML introductory tutorial: Application of table tags
>>: Solution to MySQL master-slave delay problem
Table of contents Overview Four examples Example ...
The EXPLAIN statement provides information about ...
Preface innodb_data_file_path is used to specify ...
1: Docker private warehouse installation 1. Downl...
MySQL implements Oracle-like sequences Oracle gen...
Table of contents 1. Array.at() 2. Array.copyWith...
1. Page requirements 1) Use standard headers and ...
As an entry-level Linux user, I have used simple ...
illustrate MySql Community Edition supports table...
Which parameter does the rpm command use to insta...
This article shares with you a graphic tutorial o...
In order to enhance the ability to write JavaScri...
Table of contents 1. Introduction: 2. The first i...
Table of contents Preface 1. What is scalability?...
In life, the Internet is everywhere. We can play ...