Çeşitli Linux dağıtımlarına Docker ve Docker Compose yükleyerek uygulamalarınızı konteynerleştirin; taşınabilir ve standartlaştırılmış bir dağıtım yapın.
Docker Kurulumu
Alibaba Cloud Linux 3
Çakışmaları önlemek için Docker'ı yüklemeden önce mevcut tüm Docker bileşenlerini kaldırın.
-
Docker Community Edition'ı yükleyin.
Alibaba Cloud sunucusu kullanmıyorsanız
http://mirrors.cloud.aliyuncs.comadresinihttps://mirrors.aliyun.comile değiştirin#Add the Docker package repository sudo wget -O /etc/yum.repos.d/docker-ce.repo http://mirrors.cloud.aliyuncs.com/docker-ce/linux/centos/docker-ce.repo sudo sed -i 's|https://mirrors.aliyun.com|http://mirrors.cloud.aliyuncs.com|g' /etc/yum.repos.d/docker-ce.repo #Install the dnf repository compatibility plugin for Alibaba Cloud Linux 3 sudo dnf -y install dnf-plugin-releasever-adapter --repo alinux3-plus #Install Docker Community Edition, the containerd.io container runtime, and the Docker Buildx and Compose plugins sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -
Docker'ı başlatın ve önyüklemede otomatik olarak başlamasını etkinleştirin.
#Start Docker sudo systemctl start docker #Set the Docker daemon to start automatically on system boot sudo systemctl enable docker
Alibaba Cloud Linux 4
Çakışmaları önlemek için Docker'ı yüklemeden önce mevcut tüm Docker bileşenlerini kaldırın.
-
Docker'ı yükleyin.
Alibaba Cloud Linux deposundan Moby yükleyin
Moby, Docker'ın temel işlevlerinin tamamını içerir. Alibaba Cloud Linux 4'te konteyner motoru yerel olarak moby paketi tarafından sağlanır. Moby'yı yükledikten sonra sistem komutları, hizmet adı (dockerd), API ve konteyner görüntüleri standart Docker ile tam uyumludur.
sudo yum install -y mobyDocker CE deposundan Docker CE yükleyin
Alibaba Cloud dışındaki sunucular için
http://mirrors.cloud.aliyuncs.comadresinihttps://mirrors.aliyun.comile değiştirin. Docker CE deposundan CentOS uyumlu bir sürüm seçin ve kurulumdan önce eski Docker sürümünün kaldırıldığından emin olun.#Add the Docker CE package repository sudo wget -O /etc/yum.repos.d/docker-ce.repo http://mirrors.cloud.aliyuncs.com/docker-ce/linux/centos/docker-ce.repo sudo sed -i 's|https://mirrors.aliyun.com|http://mirrors.cloud.aliyuncs.com|g' /etc/yum.repos.d/docker-ce.repo #You must select which CentOS version to install, such as CentOS 9 or CentOS 10, and then replace $releasever with the corresponding version number. # To use CentOS 9, run: sudo sed -i 's|$releasever|9|' /etc/yum.repos.d/docker-ce.repo # To use CentOS 10, run: sudo sed -i 's|$releasever|10|' /etc/yum.repos.d/docker-ce.repo #Install Docker Community Edition, the containerd.io container runtime, and the Docker Buildx and Compose plugins sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-pluginNotDocker CE kullandıktan sonra Alibaba Cloud Linux 4 tarafından yerel olarak sağlanan Moby konteyner çalışma zamanına geri dönmek için önce Docker CE bileşenlerini kaldırın ve CentOS deposunu devre dışı bırakın.
sudo yum remove -y docker-ce docker-ce-cli sudo rm -rf /etc/yum.repos.d/docker-ce.repo -
Docker'ı başlatın ve önyüklemede otomatik olarak başlamasını etkinleştirin.
# Start the service and enable it to start on boot sudo systemctl start docker sudo systemctl enable docker # Verify the installation docker --version # This will display the installed version
Moby, varsayılan konteyner çalışma zamanıdır ve güncellemeler almaya devam edecektir.
Eski Docker bileşenleri ileriye dönük uyumluluk için kullanılabilir durumda kalır ancak güncelleme almaz.
Ubuntu
Çakışmaları önlemek için Docker'ı yüklemeden önce mevcut tüm Docker bileşenlerini kaldırın.
-
Docker Community Edition'ı yükleyin.
Alibaba Cloud sunucusu kullanmıyorsanız
http://mirrors.cloud.aliyuncs.comadresinihttps://mirrors.aliyun.comile değiştirin#Update the package management tool sudo apt-get update #Add the Docker package repository sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common sudo curl -fsSL http://mirrors.cloud.aliyuncs.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository -y "deb [arch=$(dpkg --print-architecture)] http://mirrors.cloud.aliyuncs.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" #Install Docker Community Edition, the containerd.io container runtime, and the Docker Buildx and Compose plugins sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -
Docker'ı başlatın ve önyüklemede otomatik olarak başlamasını etkinleştirin.
#Start Docker sudo systemctl start docker #Set the Docker daemon to start automatically on system boot sudo systemctl enable docker
Debian
Çakışmaları önlemek için Docker'ı yüklemeden önce mevcut tüm Docker bileşenlerini kaldırın.
-
Docker Community Edition'ı yükleyin.
Alibaba Cloud sunucusu kullanmıyorsanız
http://mirrors.cloud.aliyuncs.comadresinihttps://mirrors.aliyun.comile değiştirin#Update the package management tool sudo apt-get update #Add the Docker package repository sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common sudo curl -fsSL http://mirrors.cloud.aliyuncs.com/docker-ce/linux/debian/gpg | sudo apt-key add - sudo add-apt-repository -y "deb [arch=$(dpkg --print-architecture)] http://mirrors.cloud.aliyuncs.com/docker-ce/linux/debian $(lsb_release -cs) stable" #Install Docker Community Edition, the containerd.io container runtime, and the Docker Buildx and Compose plugins sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -
Docker'ı başlatın ve önyüklemede otomatik olarak başlamasını etkinleştirin.
#Start Docker sudo systemctl start docker #Set the Docker daemon to start automatically on system boot sudo systemctl enable docker
Red Hat
Çakışmaları önlemek için Docker'ı yüklemeden önce mevcut tüm Docker bileşenlerini kaldırın.
-
Docker Community Edition'ı yükleyin.
Alibaba Cloud sunucusu kullanmıyorsanız
http://mirrors.cloud.aliyuncs.comadresinihttps://mirrors.aliyun.comile değiştirin#Add the Docker package repository sudo wget -O /etc/yum.repos.d/docker-ce.repo http://mirrors.cloud.aliyuncs.com/docker-ce/linux/rhel/docker-ce.repo sudo sed -i 's|https://mirrors.aliyun.com|http://mirrors.cloud.aliyuncs.com|g' /etc/yum.repos.d/docker-ce.repo #Install Docker Community Edition, the containerd.io container runtime, and the Docker Buildx and Compose plugins sudo yum -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -
Docker'ı başlatın ve önyüklemede otomatik olarak başlamasını etkinleştirin.
#Start Docker sudo systemctl start docker #Set the Docker daemon to start automatically on system boot sudo systemctl enable docker
Fedora
Çakışmaları önlemek için Docker'ı yüklemeden önce mevcut tüm Docker bileşenlerini kaldırın.
-
Docker Community Edition'ı yükleyin.
Alibaba Cloud sunucusu kullanmıyorsanız
http://mirrors.cloud.aliyuncs.comadresinihttps://mirrors.aliyun.comile değiştirin#Add the Docker package repository sudo wget -O /etc/yum.repos.d/docker-ce.repo http://mirrors.cloud.aliyuncs.com/docker-ce/linux/fedora/docker-ce.repo sudo sed -i 's|https://mirrors.aliyun.com|http://mirrors.cloud.aliyuncs.com|g' /etc/yum.repos.d/docker-ce.repo #Install Docker Community Edition, the containerd.io container runtime, and the Docker Buildx and Compose plugins sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -
Docker'ı başlatın ve önyüklemede otomatik olarak başlamasını etkinleştirin.
#Start Docker sudo systemctl start docker #Set the Docker daemon to start automatically on system boot sudo systemctl enable docker
Anolis OS
Çakışmaları önlemek için Docker'ı yüklemeden önce mevcut tüm Docker bileşenlerini kaldırın.
-
Docker Community Edition'ı yükleyin.
Alibaba Cloud sunucusu kullanmıyorsanız
http://mirrors.cloud.aliyuncs.comadresinihttps://mirrors.aliyun.comile değiştirin#Add the Docker package repository sudo wget -O /etc/yum.repos.d/docker-ce.repo http://mirrors.cloud.aliyuncs.com/docker-ce/linux/centos/docker-ce.repo sudo sed -i 's|https://mirrors.aliyun.com|http://mirrors.cloud.aliyuncs.com|g' /etc/yum.repos.d/docker-ce.repo #Install Docker Community Edition, the containerd.io container runtime, and the Docker Buildx and Compose plugins sudo yum -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -
Docker'ı başlatın ve önyüklemede otomatik olarak başlamasını etkinleştirin.
#Start Docker sudo systemctl start docker #Set the Docker daemon to start automatically on system boot sudo systemctl enable docker
Alibaba Cloud Linux 2
Çakışmaları önlemek için Docker'ı yüklemeden önce mevcut tüm Docker bileşenlerini kaldırın.
-
Docker Community Edition'ı yükleyin.
Alibaba Cloud sunucusu kullanmıyorsanız
http://mirrors.cloud.aliyuncs.comadresinihttps://mirrors.aliyun.comile değiştirin#Add the Docker package repository sudo wget -O /etc/yum.repos.d/docker-ce.repo http://mirrors.cloud.aliyuncs.com/docker-ce/linux/centos/docker-ce.repo sudo sed -i 's|https://mirrors.aliyun.com|http://mirrors.cloud.aliyuncs.com|g' /etc/yum.repos.d/docker-ce.repo #Install the yum repository compatibility plugin for Alibaba Cloud Linux 2 sudo yum install yum-plugin-releasever-adapter --disablerepo=* --enablerepo=plus #Install Docker Community Edition, the containerd.io container runtime, and the Docker Buildx and Compose plugins sudo yum -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -
Docker'ı başlatın ve önyüklemede otomatik olarak başlamasını etkinleştirin.
#Start Docker sudo systemctl start docker #Set the Docker daemon to start automatically on system boot sudo systemctl enable docker
CentOS 7.x
Çakışmaları önlemek için Docker'ı yüklemeden önce mevcut tüm Docker bileşenlerini kaldırın.
-
Docker Community Edition'ı yükleyin.
Alibaba Cloud sunucusu kullanmıyorsanız
http://mirrors.cloud.aliyuncs.comadresinihttps://mirrors.aliyun.comile değiştirin#Add the Docker package repository sudo wget -O /etc/yum.repos.d/docker-ce.repo http://mirrors.cloud.aliyuncs.com/docker-ce/linux/centos/docker-ce.repo sudo sed -i 's|https://mirrors.aliyun.com|http://mirrors.cloud.aliyuncs.com|g' /etc/yum.repos.d/docker-ce.repo #Install Docker Community Edition, the containerd.io container runtime, and the Docker Buildx and Compose plugins sudo yum -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -
Docker'ı başlatın ve önyüklemede otomatik olarak başlamasını etkinleştirin.
#Start Docker sudo systemctl start docker #Set the Docker daemon to start automatically on system boot sudo systemctl enable docker
CentOS 8.x
Çakışmaları önlemek için Docker'ı yüklemeden önce mevcut tüm Docker bileşenlerini kaldırın.
-
Docker Community Edition'ı yükleyin.
Alibaba Cloud sunucusu kullanmıyorsanız
http://mirrors.cloud.aliyuncs.comadresinihttps://mirrors.aliyun.comile değiştirin#Add the Docker package repository sudo wget -O /etc/yum.repos.d/docker-ce.repo http://mirrors.cloud.aliyuncs.com/docker-ce/linux/centos/docker-ce.repo sudo sed -i 's|https://mirrors.aliyun.com|http://mirrors.cloud.aliyuncs.com|g' /etc/yum.repos.d/docker-ce.repo #Install Docker Community Edition, the containerd.io container runtime, and the Docker Buildx and Compose plugins sudo dnf -y install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin -
Docker'ı başlatın ve önyüklemede otomatik olarak başlamasını etkinleştirin.
#Start Docker sudo systemctl start docker #Set the Docker daemon to start automatically on system boot sudo systemctl enable docker
Web uygulaması dağıtma
-
Görüntüyü oluşturun.
#Pull the latest Nginx image sudo docker pull nginx:latest #Create a Dockerfile that sets Nginx as the base image and creates an index.html file that displays "Hello World!" in the web server's root directory. sudo tee Dockerfile <<-'EOF' FROM nginx:latest RUN echo 'Hello World!' > /usr/share/nginx/html/index.html EOF #Build the image and name it hello-world sudo docker build . -t hello-world:latest -
Görüntüden
hello-worldadlı bir konteyner başlatın.sudo docker run -d -p 80:80 --name hello-world hello-world:latest curl http://localhostkomutunu çalıştırarak dağıtımı doğrulayın. ÇıktıdaHello World!metni görünmelidir.
Docker Compose Kurulumu
Tek bir YAML dosyasından çoklu konteyner uygulamalarını tanımlamak ve çalıştırmak için Docker Compose kullanın.
Alibaba Cloud Linux, CentOS, Red Hat, Anolis, Fedora
sudo yum -y install docker-compose-plugin
Ubuntu, Debian
sudo apt-get -y install docker-compose-plugin
Kurulum komutunu çalıştırırken bir hata oluşursa Docker Compose kurulumunun başarısız olması bölümüne bakın. Yazılım deposunu yapılandırdıktan sonra kurulum komutunu tekrar çalıştırın.
Uygulama dağıtma
-
Bir
docker-compose.yamldosyası oluşturun.#Create the orchestration file and add MySQL and WordPress services sudo tee docker-compose.yaml <<-'EOF' version: '3.1' services: wordpress: image: wordpress restart: always ports: - "80:80" environment: #Database host address WORDPRESS_DB_HOST: wordpress_db #Database username WORDPRESS_DB_USER: wordpress #Database password WORDPRESS_DB_PASSWORD: ${WORDPRESS_DB_PASSWORD} #Database name WORDPRESS_DB_NAME: wordpress volumes: - wordpress:/var/www/html db: image: mysql:5.7 restart: always container_name: wordpress_db environment: #Database name MYSQL_DATABASE: wordpress #Database username MYSQL_USER: wordpress #Database password MYSQL_PASSWORD: ${WORDPRESS_DB_PASSWORD} #Database root user password MYSQL_RANDOM_ROOT_PASSWORD: ${WORDPRESS_DB_PASSWORD} volumes: - db:/var/lib/mysql volumes: wordpress: db: EOF -
WordPress'i başlatın.
<database_password>yerine MySQL şifrenizi girin.Docker Compose V2, kısa çizgi yerine boşluk kullanır; örneğin
docker compose version.#Start the service containers. sudo env "PATH=$PATH" "WORDPRESS_DB_PASSWORD=<database_password>" docker compose -f docker-compose.yaml up -d -
WordPress'e erişmek için tarayıcınızda
http://<Public_IP_address_of_your_ECS_instance>adresini açın.Güvenlik grubunuzun
80bağlantı noktasındaki gelen trafiğe izin verdiğini doğrulayın.
SSS
Docker'ı root olmayan bir kullanıcı olarak nasıl çalıştırırım?
Docker komutları varsayılan olarak root yetkileri gerektirir (sudo aracılığıyla). Her komutta sudo kullanmaktan kaçınmak için kullanıcınızı docker grubuna ekleyin.
-
Kullanıcınızı
dockergrubuna ekleyin.sudo usermod -aG docker $USER Değişikliğin uygulanması için
newgrp dockerkomutunu çalıştırın. Artıksudoolmadandockerkomutlarını kullanabilirsiniz. Değişikliğin kalıcı olması için oturumu kapatıp tekrar açın.
Neden http://mirrors.cloud.aliyuncs.com erişilemez?
Belirti:
http://mirrors.cloud.aliyuncs.comadresine erişilemiyor.Neden: Ağ kararsızlığı.
-
Çözüm:
http://mirrors.cloud.aliyuncs.comadresinihttps://mirrors.aliyun.comile değiştirin.https://mirrors.aliyun.comkullanımı genel bir IP adresi gerektirir. Bkz. İnternet Erişimini Etkinleştirme .
dnf config-manager komutu neden başarısız oluyor?
-
Belirti:
dnf config-managerçalıştırıldığında kullanım dışı uyarısı gösterilir:/usr/lib/python3/dist-packages/dnf/const.py:22: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives. Neden: Eski dnf sürümü.
Çözüm:
dnfpaketinisudo dnf update dnfkomutuyla güncelleyin, ardından Docker kurulumunu tekrar deneyin.
dnf install docker-ce komutu neden başarısız oluyor?
-
Belirti:
dnf -y install docker-ceçalıştırıldığında indirme hatasıyla başarısız olur:(8-9/12): docker-ce-24.0.7-1.el8.x86_64.rpm 38% [================- ] 8.2 MB/s | 38 MB 00:07 ETA The downloaded packages were saved in cache until the next successful transaction. You can remove cached packages by executing 'dnf clean packages'. Error: Error downloading packages: containerd.io-1.6.26-3.1.el8.x86_64: Cannot download, all mirrors were already tried without success. Neden: Eski paket önbelleği.
Çözüm:
sudo dnf clean packageskomutunu çalıştırın, ardındandockerkurulumunu tekrar deneyin.-
Belirti:
dnf -y install docker-ceçalıştırıldığında meta veri indirme hatasıyla başarısız olur:CentOS- Base 0.0 B/s | 0 B 00:30 Errors during downloading metadata for repository 'base': - Curl error (6): Couldn't resolve host name for http://mirror.centos.org/os/BaseOS/x86_64/os/repodata/repomd.xml [Could not resolve host: mirror.aliyuncs.com] - Curl error (28): Timeout was reached for http://mirror.centos.org/os/BaseOS/x86_64/os/repodata/repomd.xml [Connection timed out after 30000 milliseconds] - Curl error (6): Couldn't resolve host name for http://mirror.centos.org/os/BaseOS/x86_64/os/repodata/repomd.xml [Could not resolve host: mirror.cloud.aliyuncs.com] Error: Failed to download metadata for repo 'base': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors were tried Neden: Kullanımdan kaldırılan
CentOS 8deposu.-
Çözüm: Kullanımdan kaldırılan
CentOS 8deposunu bir Alibaba Cloud yansısıyla değiştirin.# Back up the expired software source. sudo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup # Download the Alibaba Cloud-provided CentOS-Base.repo to /etc/yum.repos.d/. wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.cloud.aliyuncs.com/repo/Centos-vault-8.5.2111.repo # Replace the software source address in the Alibaba Cloud source with an address accessible to ECS. sudo sed -i 's/mirrors.cloud.aliyuncs.com/url_tmp/g' /etc/yum.repos.d/CentOS-Base.repo && sudo sed -i 's/mirrors.aliyun.com/mirrors.cloud.aliyuncs.com/g' /etc/yum.repos.d/CentOS-Base.repo && sudo sed -i 's/url_tmp/mirrors.aliyun.com/g' /etc/yum.repos.d/CentOS-Base.repo # Clear the old cache and generate a new one. sudo yum clean all && sudo yum makecacheArdından
dockerkurulumunu tekrar deneyin.
Docker Compose kurulumunun başarısız olması
Docker Compose kurulum komutu başarısız olursa örnekte yazılım deposu yapılandırılmamış olabilir. Örneğin işletim sistemine göre bir yazılım deposu yapılandırabilirsiniz. Yapılandırma tamamlandıktan sonra Docker Compose kurulum komutunu tekrar çalıştırın.
Alibaba Cloud Linux 3
#Add the Docker package repository
sudo wget -O /etc/yum.repos.d/docker-ce.repo http://mirrors.cloud.aliyuncs.com/docker-ce/linux/centos/docker-ce.repo
sudo sed -i 's|https://mirrors.aliyun.com|http://mirrors.cloud.aliyuncs.com|g' /etc/yum.repos.d/docker-ce.repo
#Install the dnf repository compatibility plugin for Alibaba Cloud Linux 3
sudo dnf -y install dnf-plugin-releasever-adapter --repo alinux3-plus
Ubuntu
#Update the package management tool
sudo apt-get update
sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
#Add the Docker package repository
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL http://mirrors.cloud.aliyuncs.com/docker-ce/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
ARCH=$(dpkg --print-architecture)
DISTRO=$(. /etc/os-release && echo "$VERSION_CODENAME")
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null <<EOF
deb [arch=${ARCH} signed-by=/etc/apt/keyrings/docker.gpg] http://mirrors.cloud.aliyuncs.com/docker-ce/linux/ubuntu ${DISTRO} stable
EOF
sudo apt-get update
Debian
Debian 10 ve önceki sürümler için lütfen öncelikle yazılım depolarını yapılandırın .
#Update the package management tool
sudo apt update
sudo apt install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL http://mirrors.cloud.aliyuncs.com/docker-ce/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc
#Add the Docker package repository
sudo tee /etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
URIs: http://mirrors.cloud.aliyuncs.com/docker-ce/linux/debian
Suites: $(. /etc/os-release && echo "$VERSION_CODENAME")
Components: stable
Signed-By: /etc/apt/keyrings/docker.asc
EOF
sudo apt update
Red Hat
#Add the Docker package repository
sudo wget -O /etc/yum.repos.d/docker-ce.repo http://mirrors.cloud.aliyuncs.com/docker-ce/linux/rhel/docker-ce.repo
sudo sed -i 's|https://mirrors.aliyun.com|http://mirrors.cloud.aliyuncs.com|g' /etc/yum.repos.d/docker-ce.repo
Fedora
#Add the Docker package repository
sudo wget -O /etc/yum.repos.d/docker-ce.repo http://mirrors.cloud.aliyuncs.com/docker-ce/linux/fedora/docker-ce.repo
sudo sed -i 's|https://mirrors.aliyun.com|http://mirrors.cloud.aliyuncs.com|g' /etc/yum.repos.d/docker-ce.repo
Anolis OS / CentOS
#Add the Docker package repository
sudo wget -O /etc/yum.repos.d/docker-ce.repo http://mirrors.cloud.aliyuncs.com/docker-ce/linux/centos/docker-ce.repo
sudo sed -i 's|https://mirrors.aliyun.com|http://mirrors.cloud.aliyuncs.com|g' /etc/yum.repos.d/docker-ce.repo
Alibaba Cloud Linux 2
#Add the Docker package repository
sudo wget -O /etc/yum.repos.d/docker-ce.repo http://mirrors.cloud.aliyuncs.com/docker-ce/linux/centos/docker-ce.repo
sudo sed -i 's|https://mirrors.aliyun.com|http://mirrors.cloud.aliyuncs.com|g' /etc/yum.repos.d/docker-ce.repo
#Install the yum repository compatibility plugin for Alibaba Cloud Linux 2
sudo yum install yum-plugin-releasever-adapter --disablerepo=* --enablerepo=plus
Referanslar
Resmi Docker belgelerine bakın.
Alibaba Cloud Artifact Center , Alibaba Cloud ve OpenAnolis topluluğundan ücretsiz, güvenli temel konteyner görüntüleri sağlar.
Kurumsal P2P hızlandırma özelliğini kullanarak görüntü çekimlerini hızlandırın.
Alibaba Cloud kaynaklarını yönetmek için Docker konteynerinde Cloud Assistant CLI çalıştırın .