This is the 8th day of my participation in the August More Text Challenge

The previous article introduces the production and operation of the image. Today, it mainly introduces how to publish the image, which is mainly sent to DockerHub and Ali Cloud

Published to dockerhub

registered

1. Sign up for hub.docker.com/

landing

2. Log in to dockerHub on the server first

docker login -u username
Copy the code

A success message is displayed after you enter the correct password

submit

Then you can commit the image. If you commit the image directly, you may get the following error

➜ dockertest docker push mycentos: 0.1 The push refers to The repository docker. IO/library/mycentos 670161506181: Preparing b6334959542a: Preparing 5f70bf18a086: Preparing 2653d992f4ef: Preparing denied: requested access to the resource is deniedCopy the code

Or this mistake

➜ dockertest docker push cbajajaj/mycentos: 0.1 The push refers to The repository docker. IO/cbajajaj/mycentos An image does  not exist locally with the tag: cbajajaj/mycentosCopy the code

So you need to tag it locally; You can upload it again

Docker tag mycentos: cbajajaj/mycentos 0.1:1.0Copy the code

From the output log, you can see that the commit is also committed at the mirror level

And then we can go to dockerHub and look at the image that we submitted

Publish to Aliyun

Creating a Namespace

Log in to Aliyun, find the container mirroring service, and create a namespace

Creating a Mirror repository

1. The default warehouse type is private

2. The next step is the local warehouse

3. There will be such a warehouse after the successful creation

Click on it and you can see that the documentation of Aliyun is quite detailed

Upload the image

The document is written clearly, follow the line, here is not to do more introduction, mainly ali cloud document is too detailed…

After the upload is successful, the image we uploaded can be seen in the image version, and click to see

The script we wrote (check it out for yourself)

The above is about the image published to DockerHub and Ali Cloud introduction, if you are interested in it you can practice

summary

Now we have made a series of the whole process of Docker, here is appropriate to make a small summary, the following is docker official introduction to Docker, combined with the column to see the following figure should be more feeling, in fact, is the whole process of Docker, the column has also made a more detailed introduction, you can compare

As for save and load, it is also very simple to know by yourself

Now THAT I have learned docker is a real introduction, I may learn docker network and compose in the future, hoping to have a deeper and comprehensive understanding of Docker, and also hope this article can be helpful to you. Come on…

There are no trails of wings in the sky, but the birds have flown away — Tagore