Use nexus as a private library to proxy docker to upload and download images

Use nexus as a private library to proxy docker to upload and download images

1. Nexus configuration

1. Create a docker proxy

Used to pull images from the external network warehouse to the local warehouse.

Click "create Repository" and select docker (proxy) to create

Fill in the parameters

Click "create repository" to create

2. Create docker hosted

Used to upload your own image to a private library

Click "create Repository" and select docker (hosted) to create

Fill in the parameters:

Click "create repository" to create

3. Create a docker group

Used to pull images to local use, you can download images from the external network and push images from local to private libraries

Click "create Repository" and select docker (group) to create

Used to download from the warehouse. You can download images from external warehouses and images uploaded by yourself.

Configuration parameters

Click "create repository" to create

4. Configure Docker Realm

Configure Docker Bearer Token Realm to the right and click save.

2. Docker configuration

Here we use http, not https, so we need to modify the docker configuration file

Use the command vi /etc/docker/daemon.json to modify the docker configuration file

Add the following parameters: the IP address is the IP address of the private library server, and the port is the port filled in when creating the docker group and docker hosted

{
“insecure-registries”: [“192.168.99.1:8088”, “192.168.99.1:8089”]
}

Then save it. After saving successfully, restart docker

Use docker info to check whether the configuration is successful. If the following information is displayed, the configuration is successful.

3. Upload and download images

1. Download the image

Use docker pull 192.168.99.1:8089/ubuntu to pull the image

Because anonymous pull was checked in the previous configuration, you don't need to log in to pull. If you need to control permissions and prevent anonymous pull, uncheck the following configuration

2. Upload the image

You can query the image just uploaded on nexus

Use docker pull 192.168.99.1:8088/centlocal:1.0 to pull the uploaded image

The above article uses nexus as a private library to proxy docker to upload and download image operations. This is all the content that the editor shares with you. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM.

You may also be interested in:
  • How to create a Docker repository using Nexus
  • Using Docker to build a Nexus private warehouse to implement Maven private service

<<:  10 performance configuration items that need to be adjusted after installing MySQL

>>:  The submit event of the form does not respond

Recommend

Introduction and analysis of three Binlog formats in MySQL

one. Mysql Binlog format introduction Mysql binlo...

Implementation of Docker CPU Limit

1. --cpu=<value> 1) Specify how much availa...

Introduction to MySQL role functions

Table of contents Preface: 1. Introduction to rol...

Five guidelines to help you write maintainable CSS code

1. Add a comment block at the beginning of the sty...

Common tags in XHTML

What are XHTML tags? XHTML tag elements are the b...

Mini Program Recording Function Implementation

Preface In the process of developing a mini progr...

Docker Compose installation and usage steps

Table of contents 1. What is Docker Compose? 2. D...

Database query optimization: subquery optimization

1. Case Take all employees who are not the head o...

Example of usage of keep-alive component in Vue

Problem description (what is keep-alive) keep-ali...

Mysql command line mode access operation mysql database operation

Usage Environment In cmd mode, enter mysql --vers...

Introduction to new features of MySQL 8.0.11

MySQL 8.0 for Windows v8.0.11 official free versi...