Docker的安装
作者:互联网
### Docker的安装
## 实战演习
# 系统更新
sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
# 安装系统依赖包
sudo apt-get install\
apt-transport-https\
ca-certificates\
curl\
gnupg-agent\
software-properties-common
# 加入 Docker信息库密钥
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
790B C727 7767 219C 42C8 6F93 3B4F E6AC C0B2 1F32
# key确认
apt-key list
# 最后8位作为 fingerprint参数
sudo apt-key fingerprint C0B21F32
# 将 Docker信息库加入本地信息库当中
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release
# 查看OS采用核心号
lsb_release -a
# 查看信息库加入的位置和内容
S cat /etc/apt/sources.list|grep docker
# 系统再更新 S sudo apt update S sudo apt upgrade # Dockers安装 S apt show docker-ce S sudo apt-get install docker-ce docker-ce-cli containerd.io 校验安装 S docker help S docker version 最后8位作为 ingerprint参数 S sudo apt-key fingerprint 0EBFCD88 Docker信息库加入本地信息库当中 S sudo add-apt-repository deb[arch=amd64]https://download.docker.com/inux/ubuntu\ S(lsb release-cs)\
apt-get install docker.io docker version sudo vi /lib/systemd/system/docker.service ExecStart=/usr/bin/dockerd -H tcp://192.168.123.30:2375 -H unix:///var/run/docker.sock http://192.168.123.30:2375/images/json curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
设置docker开机自启 systemctl enable docker -------------------portainer安装---------------------- 拉取映像 docker pull portainer/portainer
创建并运行docker docker run -d -p 8012:8012 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /home/aaron/portainer:/data portainer/portainer
sudo passwd root
# 系统再更新 S sudo apt update S sudo apt upgrade # Dockers安装 S apt show docker-ce S sudo apt-get install docker-ce docker-ce-cli containerd.io 校验安装 S docker help S docker version 最后8位作为 ingerprint参数 S sudo apt-key fingerprint 0EBFCD88 Docker信息库加入本地信息库当中 S sudo add-apt-repository deb[arch=amd64]https://download.docker.com/inux/ubuntu\ S(lsb release-cs)\
apt-get install docker.io docker version sudo vi /lib/systemd/system/docker.service ExecStart=/usr/bin/dockerd -H tcp://192.168.123.30:2375 -H unix:///var/run/docker.sock http://192.168.123.30:2375/images/json curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
设置docker开机自启 systemctl enable docker -------------------portainer安装---------------------- 拉取映像 docker pull portainer/portainer
创建并运行docker docker run -d -p 8012:8012 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /home/aaron/portainer:/data portainer/portainer
sudo passwd root
标签:get,sudo,apt,信息库,portainer,Docker,安装,docker 来源: https://www.cnblogs.com/yvoonekit/p/15056679.html