Docker configuration Alibaba Cloud Container Service operation

Docker configuration Alibaba Cloud Container Service operation

Configuring Alibaba Cloud Docker Container Service

To log in to the Alibaba Cloud Image Service console, you must first have your own Alibaba Cloud account

1. Click on the name space. It is recommended to use your own name/company name

For example, aliyun-stg

Create the namespace

2. Click on the image repository, create an image, and fill in the detailed information

Warehouses can be managed using names such as Redis, mysql, etc.

Create a warehouse

3. Observe the information after creation

registry.cn-beijing.aliyuncs.com/aliyun-stg/flask

Ali Docker domain name registry.cn-beijing.aliyuncs.com

My own namespace and others cannot overlap.

The image repository name cannot be repeated in the same namespace as your own.

4. We chose local configuration

# Set Alibaba Cloud username and password $ sudo docker login --username=your username registry.cn-beijing.aliyuncs.com

# Pull the image from the registry $ sudo docker pull registry.cn-beijing.aliyuncs.com/aliyun-stg/flask:[image version number]

# Push the image from local to Registry
# Select the registry address, Shanghai, Beijing or Shenzhen$ sudo docker login --username=your username registry.cn-beijing.aliyuncs.com
# Change the tag of the local image so that it looks consistent with Alibaba's path. $ sudo docker tag [ImageId] registry.cn-beijing.aliyuncs.com/aliyun-stg/flask:[image version number]
# Push to Alibaba Cloud Docker repository$ sudo docker push registry.cn-beijing.aliyuncs.com/aliyun-stg/flask:[image version number]

The above is to use the public network for push. If the server you are using happens to be Alibaba Cloud, you can use the intranet for push, which will not occupy your public network bandwidth.

If the machine you are using is located in a VPC network, please use registry-vpc.cn-beijing.aliyuncs.com as the domain name to log in to the Registry and as the image namespace prefix.

For example, if the local image is called Redis, then you also create a repository called Redis on the cloud.

Push different versions of Redis to this repository

# Use the "docker tag" command to rename the image and push it to the registry via the private network address.
$ sudo docker images

REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
registry.aliyuncs.com/acs/agent 0.7-dfb6816 37bb9c63c8b2 7 days ago 37.89 MB

$ sudo docker tag 37bb9c63c8b2 registry-vpc.cn-beijing.aliyuncs.com/acs/agent:0.7-dfb6816

# Use the "docker images" command to find the image and change the domain name in the image name to the registry private network address.
$ sudo docker push registry-vpc.cn-beijing.aliyuncs.com/acs/agent:0.7-dfb6816

The above article about Docker configuration of Alibaba Cloud Container Service is all I have to share 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:
  • Detailed explanation of Docker container network port configuration process
  • Detailed explanation of common commands for network configuration of containers in Docker
  • Detailed explanation of Docker fast build and Alibaba Cloud container acceleration configuration under Windows 7 environment
  • Implementation of modifying configuration files in Docker container
  • Summary of Docker configuration container location and tips
  • nginx automatically generates configuration files in docker container
  • Docker modifies the configuration information of an unstarted container

<<:  HTML implements the function of detecting input completion

>>:  Detailed explanation of keepAlive usage in Vue front-end development

Recommend

How to obtain root permissions in a docker container

First, your container must be running You can vie...

Vue makes div height draggable

This article shares the specific code of Vue to r...

CSS complete parallax scrolling effect

1. What is Parallax scrolling refers to the movem...

Simple example of limit parameter of mysql paging

Two parameters of Mysql paging select * from user...

Detailed explanation of Vue3 life cycle functions and methods

1. Overview The so-called life cycle function is ...

Five things a good user experience designer should do well (picture and text)

This article is translated from the blog Usability...

40 CSS/JS style and functional technical processing

1- Styling dropdown select boxes - Modify the dro...

KVM virtualization installation, deployment and management tutorial

Table of contents 1.kvm deployment 1.1 kvm instal...

Detailed discussion of InnoDB locks (record, gap, Next-Key lock)

Record lock locks a single index record. Record l...

Double loading issue when the page contains img src

<br />When the page contains <img src=&qu...

JS implements simple example code to control video playback speed

introduction I discovered a problem before: somet...

Detailed example of creating and deleting tables in MySQL

The table creation command requires: The name of...

WeChat applet learning wxs usage tutorial

What is wxs? wxs (WeiXin Script) is a scripting l...

CentOS7 installation GUI interface and remote connection implementation

Use the browser (webdriver)-based selenium techno...