docker教程系列六

导航

docker在服务器部署

前面的文章也写过关于服务器怎么部署的

详见: 使用compose部署多容器应用

下面是一个安装docker的sh配置脚本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# 官方安装指南 Ubuntu 版本
# https://docs.docker.com/install/linux/docker-ce/ubuntu

sudo apt update

# docker 的源是 https,所以安装这些软件用于支持 https 的 apt 仓库
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common

# 添加 Docker 的官方 GPG key
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

# 设置官方 Docker 源
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"

# 安装 Docker
sudo apt update
sudo apt install -y docker-ce

# 如果你想验证 Docker 安装好了,可以运行一个 hello-world 容器
# sudo docker run hello-world
文章作者: woyao
文章链接: https://chenwoyao.github.io/2021/04/20/docker系列/docker教程系列六/
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 woyao的博客