Ubuntu
$ su
$ apt-get install curl
$ apt-get install docker.io
Linux Mint 18
$ su
$ apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
$ gedit /etc/apt/sources.list.d/docker.list
# Ubuntu Xenial (16.04)
deb https://apt.dockerproject.org/repo ubuntu-xenial main
$ apt-get update
$ apt-get purge lxc-docker
# apt-get install linux-image-extra-$(uname -r)
$ apt-get install docker-engine
Fedora 23
$ su
$ dnf update -y
$ dnf -y install docker-io
CentOS 7
$ su
$ yum install docker
或
# 安装较新版的 docker
$ gedit /etc/yum.repos.d/docker.repo
[virt7-docker-common-candidate]
name=virt7-docker-common-candidate
baseurl=http://cbs.centos.org/repos/virt7-docker-common-candidate/x86_64/os/
enabled=1
gpgcheck=0
$ yum install docker --disablerepo=extras
安装后..
# 将 username 加入, 让这个 ID 可以运行 docker
$ usermod -aG docker username
或
$ groupadd docker
$ gpasswd -a ${USER} docker
$ service docker restart
$ systemctl start docker
$ systemctl enable docker
# 查看 docker 状况
$ systemctl status docker
# 关闭 docker
$ systemctl disable docker
$ systemctl stop docker
没有评论:
发表评论