docker into the container bash replace Alibaba source

Need to install Keepalived to change source in Haproxy container

First enter the bash in the docker container through the command

docker exec -it  容器id或容器名 bash

Edit the software source first need to install vim

apt-get install vim -y

Edit source

vim /etc/apt/sources.list

Just replace the previous domain name with Ali as shown below

mirrors.aliyun.com

 Then update

apt-get update

As shown in the figure below, no error message is reported to indicate success 

Published 303 original articles · praised 37 · 30,000+ views

Guess you like

Origin blog.csdn.net/qq_41813208/article/details/105526231