(OK)(OK) Install Docker on Fedora 23


---------Install Docker on Fedora 23
dnf update -y
dnf -y install docker-io
systemctl start docker

systemctl start docker.service
systemctl restart docker.service
systemctl stop docker.service
systemctl status docker.service

systemctl status docker -l

^^^^^^宿主机测试
docker images
docker search centos
docker pull centos
docker images
docker tag 2933d50b9f77 docker.io/centos:core
docker run centos echo "hello world!"
^^^^^^至此,宿主机 OK

docker run --rm -it centos /bin/bash
docker run --rm -it -d centos /bin/bash
docker run --rm centos echo "hello world!"
docker run centos echo "hello world!"
docker run --cap-add=NET_ADMIN --cap-add=SYS_ADMIN centos echo "hello world!"
docker run --privileged  -ti -v /sys/fs/cgroup:/sys/fs/cgroup centos echo "hello world!"
docker run --privileged  -ti -e "container=docker"  -v /sys/fs/cgroup:/sys/fs/cgroup  centos  /usr/sbin/init


posted @ 2016-07-21 21:14  张同光  阅读(79)  评论(0编辑  收藏  举报