“Docker and docker-compose快速安装”的版本间的差异
跳到导航
跳到搜索
小 (导入1个版本) |
|||
第1行: | 第1行: | ||
− | =docker docker-compose= | + | =docker docker-compose on cenos7= |
<pre> | <pre> | ||
#install docker | #install docker | ||
第41行: | 第41行: | ||
docker system info | grep "Root Dir" | docker system info | grep "Root Dir" | ||
</pre> | </pre> | ||
+ | |||
+ | |||
+ | =on debian= | ||
+ | <pre> | ||
+ | |||
+ | |||
+ | </pre> | ||
+ | |||
+ | |||
+ | =docker-compose= | ||
+ | <pre> | ||
+ | sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | ||
+ | sudo chmod +x /usr/local/bin/docker-compose | ||
+ | docker-compose | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | https://docs.docker.com/compose/install/ | ||
+ | |||
[[category:ops]] [[category:Container]] | [[category:ops]] [[category:Container]] |
2019年11月8日 (五) 01:53的版本
docker docker-compose on cenos7
#install docker yum remove docker \ docker-client \ docker-client-latest \ docker-common \ docker-latest \ docker-latest-logrotate \ docker-logrotate \ docker-selinux \ docker-engine-selinux \ docker-engine yum install -y yum-utils \ device-mapper-persistent-data \ lvm2 yum-config-manager \ --add-repo \ https://mirrors.ustc.edu.cn/docker-ce/linux/centos/docker-ce.repo yum makecache fast yum install docker-ce -y systemctl enable docker systemctl start docker yum -y install vim wget curl yum-utils bash-completion bash-completion-extras epel-release lrzsz telnet python-pip pip install docker-compose mkdir -p /home/data/docker echo '{"graph": "/home/data/docker"}' >/etc/docker/daemon.json # cat /etc/docker/daemon.json {"graph": "/home/data/docker"} systemctl restart docker #验证docker储存位置 docker system info | grep "Root Dir"
on debian
docker-compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose docker-compose