Tag Archives: docker

Centos7 quick installation of docker and configuration of image acceleration

follow the official documentation step by step

https://docs.docker.com/engine/install/centos/

1: uninstall the old version

sudo yum remove docker \
                  docker-client \
                  docker-client-latest \
                  docker-common \
                  docker-latest \
                  docker-latest-logrotate \
                  docker-logrotate \
                  docker-engine

2: download docker dependent packages and configure docker warehouse address

 sudo yum install -y yum-utils
 sudo yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

3: install docker’s engine, operate docker’s client, and its container

sudo yum install docker-ce docker-ce-cli containerd.io

after the execution of the installation is complete

start docker command:

sudo systemctl start docker

set docker startup:

sudo systemctl enable docker

view docker version:

docker -v

view docker image:

sudo docker images

configure image acceleration: configure ali cloud

1: create directory

sudo mkdir -p /etc/docker

2: configure the mirror accelerator address

sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://17o3zxc0.mirror.aliyuncs.com"]
}
EOF

3: restart docker background thread

sudo systemctl daemon-reload

4: restart docker service

sudo systemctl restart docker


Huawei cloud Kunpeng server docker installation VIM error

problem description

huawei cloud kunpeng server docker installation vim error, architecture is Arm64,

W: Failed to fetch http://ftp.tw.debian.org/debian/dists/jessie/Release  Unable to find expected entry 'main/binary-arm64/Packages' in Release file (Wrong sources.list entry or malformed file)

, I can’t find

root@d15291ceae43:/etc/mysql# apt-get install vim
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package vim

and then update failed

root@d15291ceae43:/etc/mysql# apt-get update
Ign http://ftp.tw.debian.org jessie InRelease
Hit http://ftp.tw.debian.org jessie Release.gpg
Hit http://ftp.tw.debian.org jessie Release
W: Failed to fetch http://ftp.tw.debian.org/debian/dists/jessie/Release  Unable to find expected entry 'main/binary-arm64/Packages' in Release file (Wrong sources.list entry or malformed file)

solution, add source

printf "deb http://archive.debian.org/debian/ jessie main\ndeb-src http://archive.debian.org/debian/ jessie main\ndeb http://security.debian.org jessie/updates main\ndeb-src http://security.debian.org jessie/updates main" > /etc/apt/sources.list

update

apt-get update

installs

again

apt-get install vim

installed successfully