fandf

docker学习笔记(1)

docker的安装

一:环境

win10+centos7

  卸载旧版本:

$ sudo yum remove docker \
docker-common \
docker-selinux \
docker-engine

  使用yum安装:

    执行以下命令安装依赖包

  

$ sudo yum install -y yum-utils \
device-mapper-persistent-data \
lvm2

  安装docker

$ sudo yum makecache fast
$ sudo yum install docker-ce

  启动docker

$ sudo systemctl enable docker
$ sudo systemctl start docker

  测试docker是否安装正确

$ docker run hello-world

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://cloud.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/

  镜像加速:

  阿里云

  DaoCloud

 

posted on 2018-03-16 16:39  fandf  阅读(103)  评论(0编辑  收藏  举报