Ubuntu 快速安装 Docker

系统环境是 Ubuntu 14.04

这里基本直接按照官方的指导下载安装,浓缩成三行命令:

$ curl -sSL https://get.docker.com/ | sh
$sudo usermod -aG docker ${USER}
$ sudo service docker restart && newgrp docker

下载安装完成后,测试是否正确安装:

$ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from hello-world
a8219747be10: Pull complete
91c95931e552: Already exists
hello-world:latest: The image you are pulling has been verified. Important: image verification is a tech preview feature and should not be relied on to provide security.
Digest: sha256:aa03e5d0d5553b4c3473e89c8619cf79df368babd18681cf5daeb82aab55838d
Status: Downloaded newer image for hello-world:latest
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.
    (Assuming it was not already locally available.)
 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

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

以上结果表示正确安装

安装 docker-compose

sudo curl -o /usr/local/bin/docker-compose -L "https://github.com/docker/compose/releases/download/1.11.2/docker-compose-$(uname -s)-$(uname -m)"


sudo chmod +x /usr/local/bin/docker-compose

docker-compose -v
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 首先,祝各位新年快乐,万事如意,鸡年大吉。 这次要来说说一个和前端并不太相关的东西——docker compose...
    6ed7563919d4阅读 4,259评论 0 21
  • Docker — 云时代的程序分发方式 要说最近一年云计算业界有什么大事件?Google Compute Engi...
    ahohoho阅读 15,627评论 15 147
  • 早些年尝试帮身边单身的朋友牵线搭桥,发现不提任何要求而只说“合适就好”的,往往很难成功。 渐渐才明白,所谓“合适就...
    引光咖啡馆阅读 1,053评论 3 3
  • C++回调函数相关 1. 首先还是由最基本的"Hello World!"程序引入 2. 接下来实现一个简单的函数调...
    comma01阅读 360评论 0 0
  • 真可爱 文~白乌鸦 二岁半的儿子 很爱提问 爸爸 这是什么 爸爸 那是什么 最近学会了一句话 真可爱 爸爸 这是什...
    南倚闲坐阅读 88评论 0 0