Nexus — build docker private warehouse

Time:2021-5-31

Get nexus ready

How to install nexus is not the focus of this article

Build docker storage center

  1. Blob storage point
    Image used to store docker products
    Nexus -- build docker private warehouse
  2. docker release
    Type:docker hosted
    Own image publishing center, and push image uses this address

    • Port used

    Nexus -- build docker private warehouse

  3. What will it look like after adding it
    Just add onedocker releaseThat’s it
    Nexus -- build docker private warehouse
  4. Add docker login permission
    stayRealmsAdd permissions to
    Nexus -- build docker private warehouse
    Nexus -- build docker private warehouse

Configure docker

  1. Configuration address
    Nexus -- build docker private warehouse

    {
      "registry-mirrors": [
     "https://***.mirror.aliyuncs.com"
      ],
      "insecure-registries": [
     "192.168.1.200:7023"
      ],
      "experimental": false,
      "features": {
     "buildkit": true
      }
    }
    • registry-mirrorsIt’s a registry
    • insecure-registriesThis is to allow the use of HTTP instead of HTTPS for non secure access to addresses. Because the previously configured addresses have no use of HTTPS for secure access, this setting allows non secure http access to them. You can also configure the HTTPS security access mode

    Notes: for simplicity, only configuredocker releaseA warehouse.

use

  1. pull

    • docker pull mysql:5.7.19Pull image from default registry
  2. push

    • docker login -u admin 192.168.1.200:7023Sign in
    • docker tag mysql:latest 192.168.1.200:7023/mysql:latestLabel the image
    • docker push 192.168.1.200:7023/mysql:latestPush the image of a good label