# mac离线安装docker
https://download.docker.com/mac/stable/24312/Docker.dmg
# windows离线安装docker
http://mirrors.aliyun.com/docker-
toolbox/windows/docker-toolbox/
docker-toolbox包括以下内容:
Docker CLI //docker客户端,用来运行docker引擎创建镜像和容器
Docker Machine. //在命令
行中运行docker引擎命令
Docker Compose. //运行docker-compose命令
Kitematic. //Docker的GUI版本
Docker QuickStart shell. //Docker的命令行环境
Oracle
VM Virtualbox //虚拟机
# ubuntu离线安装
## 关于ubuntu版本
trusty (14.04LTS)
xenial (16.04LTS)
artful (17.10)
bionic (18.04LTS)
详细参考:
https://packages.ubuntu.com
## 下载docker
https://apt.dockerproject.org/repo/pool/main/d/docker-engine/
## 下载依赖包
https://pkgs.org/
libltdl7
libgcrypt20
libsystemd-journal0
## 安装
dpkg -i *.deb
## 测试
docker version
# ubuntu在线安装docker
1.curl -sSL http://acs-public-mirror.oss-cn-hangzhou.aliyuncs.com/docker-engine/internet | sh -
2.安装依赖
sudo apt-get install linux-image-extra-$(uname -r) linux-image-extra-virtual
3.添加使用 HTTPS 传输的软件包以及 CA 证书
sudo apt-get update
sudo apt-get install apt-transport-https ca-certificates
4.添加GPG密钥
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
5.添加软件源
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
6.添加成功后更新软件包缓存
sudo apt-get update
7.安装docker
sudo apt-get install docker-engine
8.启动 docker
sudo systemctl start docker
9.设置开机自启动
systemctl enable docker
systemctl disable docker
10.docker镜像加速
curl -sSL https://get.daocloud.io/daotools/set_mirror.sh | sh -s http://aaabbbccc.m.daocloud.io
docker run hello-world
编辑/etc/docker/daemon.json,添加如下内容:
{
"registry-mirrors": ["http://hub-
mirror.c.163.com","https://1234abcd.mirror.aliyuncs.com"]
}
sudo systemctl daemon-reload
sudo service docker restart