(1)備份並刪除原始檔
sudo
cp /etc/apt/sources.list /etc/apt/sources.list.bak
rm /etc/apt/sources.list
(2)插入阿里源
echo 'deb focal main restricted universe multiverse' >> /etc/apt/sources.list
echo 'deb-src focal main restricted universe multiverse' >> /etc/apt/sources.list
echo 'deb focal-security main restricted universe multiverse' >> /etc/apt/sources.list
echo 'deb-src focal-security main restricted universe multiverse' >> /etc/apt/sources.list
echo 'deb focal-updates main restricted universe multiverse' >> /etc/apt/sources.list
echo 'deb-src focal-updates main restricted universe multiverse' >> /etc/apt/sources.list
echo 'deb focal-proposed main restricted universe multiverse' >> /etc/apt/sources.list
echo 'deb-src focal-proposed main restricted universe multiverse' >> /etc/apt/sources.list
echo 'deb focal-backports main restricted universe multiverse' >> /etc/apt/sources.list
echo 'deb-src focal-backports main restricted universe multiverse' >> /etc/apt/sources.list
(3)更新源
sudo
apt-get update
apt-get
install inetutils-ping
啟動所有容器
docker start $(docker ps -a |
awk''
|tail -n +2)
停止所有容器
docker stop $(docker ps -a |
awk''
|tail -n +2)
刪除所有容器
docker rm
$(docker ps -a |
awk''
|tail -n +2)
如果出現permission denied
sudo
chmod a+rw /var/run/docker.sock
git clone
內部外部複製只需要將兩個位址調換位置
docker cp
:/file/path/within/container /host/path/target
docker search portainer
docker pull portainer/portainer
docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock portainer/portainer
Linux 一些記不好的命令記錄
記錄一些平時開發比較常用,但是又記錄不全的命令,免得下次要用的使用又網上搜?安裝 sudo apt get install 包名 解除安裝並清除配置 sudo apt get remove purge 包名 檢視埠被誰占用 lsof i 埠號 或 netstat ap grep 埠號 檢視pid v...
一些linux命令
rpm ql mplayer cat n檢視軟體包資訊 另外補充下 root centos5h wc help 用法 wc 選項 檔案 print newline,word,and byte counts for each file,and a total line if more than one...
一些Linux命令
1 打tar包檔案 tar cf all.tar filename1 filename2 2 檢視tar包檔案包含的檔案列表 tar tvf all.tar 注 tar常用引數 c 新建打包檔案,可搭配 v來檢視過程中被打包的檔名 t 檢視打包檔案的內容包含哪些檔名,重點在檢視檔名 x 解打包或解壓...