Ubuntu 18 中安装Docker

  • 安装Docker 输入命令:apt install docker.io -y
root@ubuntu:/home/guanfuchang#  apt install docker.io -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
bridge-utils cgroupfs-mount git git-man liberror-perl pigz ubuntu-fan
Suggested packages:
aufs-tools btrfs-progs debootstrap docker-doc rinse zfs-fuse | zfsutils git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk gitweb git-cvs git-mediawiki git-svn
The following NEW packages will be installed:
bridge-utils cgroupfs-mount docker.io git git-man liberror-perl pigz ubuntu-fan
0 upgraded, 8 newly installed, 0 to remove and 296 not upgraded.
Need to get 45.0 MB of archives.
After this operation, 232 MB of additional disk space will be used.
Get:1 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 pigz amd64 2.4-1 [57.4 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 bridge-utils amd64 1.5-15ubuntu1 [30.1 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu bionic/universe amd64 cgroupfs-mount all 1.4 [6,320 B]
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 docker.io amd64 18.06.1-0ubuntu1~18.04.1 [40.2 MB]
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 docker.io amd64 18.06.1-0ubuntu1~18.04.1 [40.2 MB]
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 docker.io amd64 18.06.1-0ubuntu1~18.04.1 [40.2 MB]
Get:5 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 liberror-perl all 0.17025-1 [22.8 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 git-man all 1:2.17.1-1ubuntu0.3 [803 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu bionic-updates/main amd64 git amd64 1:2.17.1-1ubuntu0.3 [3,898 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 ubuntu-fan all 0.12.10 [34.7 kB]
Fetched 11.8 MB in 11min 43s (16.7 kB/s)
Preconfiguring packages ...
Selecting previously unselected package pigz.
(Reading database ... 128796 files and directories currently installed.)
Preparing to unpack .../0-pigz_2.4-1_amd64.deb ...
Unpacking pigz (2.4-1) ...
Selecting previously unselected package bridge-utils.
Preparing to unpack .../1-bridge-utils_1.5-15ubuntu1_amd64.deb ...
Unpacking bridge-utils (1.5-15ubuntu1) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../2-cgroupfs-mount_1.4_all.deb ...
Unpacking cgroupfs-mount (1.4) ...
Selecting previously unselected package docker.io.
Preparing to unpack .../3-docker.io_18.06.1-0ubuntu1~18.04.1_amd64.deb ...
Unpacking docker.io (18.06.1-0ubuntu1~18.04.1) ...
Selecting previously unselected package liberror-perl.
Preparing to unpack .../4-liberror-perl_0.17025-1_all.deb ...
Unpacking liberror-perl (0.17025-1) ...
Selecting previously unselected package git-man.
Preparing to unpack .../5-git-man_1%3a2.17.1-1ubuntu0.3_all.deb ...
Unpacking git-man (1:2.17.1-1ubuntu0.3) ...
Selecting previously unselected package git.
Preparing to unpack .../6-git_1%3a2.17.1-1ubuntu0.3_amd64.deb ...
Unpacking git (1:2.17.1-1ubuntu0.3) ...
Selecting previously unselected package ubuntu-fan.
Preparing to unpack .../7-ubuntu-fan_0.12.10_all.deb ...
Unpacking ubuntu-fan (0.12.10) ...
Setting up git-man (1:2.17.1-1ubuntu0.3) ...
Setting up docker.io (18.06.1-0ubuntu1~18.04.1) ...
Adding group `docker' (GID 127) ...
Done.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket 鈫/lib/systemd/system/docker.socket.
Processing triggers for ureadahead (0.100.0-20) ...
Setting up liberror-perl (0.17025-1) ...
Setting up cgroupfs-mount (1.4) ...
Setting up bridge-utils (1.5-15ubuntu1) ...
Setting up ubuntu-fan (0.12.10) ...
Created symlink /etc/systemd/system/multi-user.target.wants/ubuntu-fan.service 鈫/lib/systemd/system/ubuntu-fan.service.
Processing triggers for systemd (237-3ubuntu10.3) ...
Processing triggers for man-db (2.8.3-2) ...
Setting up pigz (2.4-1) ...
Setting up git (1:2.17.1-1ubuntu0.3) ...
Processing triggers for ureadahead (0.100.0-20) ...

查看Docker安装信息

查看Docker版本,命令:docker version

root@ubuntu:/home/guanfuchang# docker version
Client:
Version: 18.06.1-ce
API version: 1.38
Go version: go1.10.4
Git commit: e68fc7a
Built: Fri Oct 19 19:43:14 2018
OS/Arch: linux/amd64
Experimental: false Server:
Engine:
Version: 18.06.1-ce
API version: 1.38 (minimum version 1.12)
Go version: go1.10.4
Git commit: e68fc7a
Built: Thu Sep 27 02:39:50 2018
OS/Arch: linux/amd64
Experimental: false

查看Docker运行信息,命令: docker info

root@ubuntu:/home/guanfuchang# docker info
Containers: 2
Running: 1
Paused: 0
Stopped: 1
Images: 1
Server Version: 18.06.1-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: (expected: 468a545b9edcd5932818eb9de8e72413e616e86e)
runc version: N/A (expected: 69663f0bd4b60df09991c08812a60108003fa340)
init version: v0.18.0 (expected: fec3683b971d9c3ef73f284f176672c44b448662)
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.15.0-29-generic
Operating System: Ubuntu 18.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 1.924GiB
Name: ubuntu
ID: R2AB:BQWA:UHTP:523R:7VDY:ZHZV:VZQK:OLF7:2PN4:FTGX:EO72:URDZ
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false WARNING: No swap limit support

检查安装是否正确, 命令:docker run hello-world

root@ubuntu:/home/guanfuchang# docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
d1725b59e92d: Pull complete
Digest: sha256:0add3ace90ecb4adbf7777e9aacf18357296e799f81cabc9fde470971e499788
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.
(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://hub.docker.com/ For more examples and ideas, visit:
https://docs.docker.com/get-started/ root@ubuntu:/home/guanfuchang#

:-:

微信扫一扫,关注“python测试开发圈”,了解更多测试教程!

Docker03-安装Docker运行环境的更多相关文章

  1. 一起玩"Docker"之1——Ubuntu配置安装Docker运行环境并安装(Ubuntu、Centos)镜像

    Docker 是一个开源的应用容器引擎,基于 Go 语言 并遵从Apache2.0协议开源. Docker 可以让开发者打包他们的应用以及依赖包到一个轻量级.可移植的容器中,然后发布到任何流行的 Li ...

  2. win10安装docker运行环境

    转自:https://www.cnblogs.com/stulzq/p/7743667.html Docker for Windows是Docker社区版(CE)应用程序. Docker for Wi ...

  3. Python 2/3 安装与运行环境设置

    Python 2/3 安装与运行环境设置: 1.Python 软件源:https://www.python.org/    下载Win版本 https://www.python.org/downloa ...

  4. Linux环境安装.NET运行环境

    Linux环境安装.NET运行环境 Linux环境安装.NET运行环境 1. 构建编译环境: (1) sudo apt-get install build-essential (2) sudo apt ...

  5. 阿里云服务器ubuntu安装java运行环境

    服务器 阿里云服务器ubuntu安装java运行环境 转:http://www.codingyun.com/article/45.html 今天来给大家介绍一下在阿里云ubuntu服务器下安装java ...

  6. 图文详解安装PHP运行环境

    一.什么是PHP运行环境 能够理解人与计算机交流时语言软件,通常指解释PHP编程语言的软件. 例如: PHP(代码) 需要PHP超文本预编译器(软件). Java需要JVM虚拟机 二.安装PHP运行环 ...

  7. 小记LoadRunner 11 安装VC2005运行环境报错处理

    这几天在做性能优化,需要在虚拟机里装个LoadRunner 11.从测试同学那里搞来安装包,按照文档提示安装系统运行环境,提示我要装VC2005 SP1. 安装程序自己安装,报错.截图如下. 于是我又 ...

  8. 04 Windows安装python运行环境

    安装python运行环境 使用微信扫码关注微信公众号,并回复:"Python工具包",免费获取下载链接! 1.卸载程序(电脑未装此程序,跳过此过程) 卸载这两个程序 出现下图所示, ...

  9. 2步安装1个hive docker运行环境[centos7]

    1 构建基础容器 基于centos环境docker环境快速搭建,执行步骤 docker build -t cenosbase7 . 执行此步骤就可以构建1个基础的centos基础运行环境 相关的文件如 ...

  10. docker运行环境安装-centos(一)

    在这里我们使用的是docker的社区版Docker CE,针对的是未安装docker的新的主机,如果安装过docker的早期版本,先卸载它们及关联的依赖资源,安装的版本为docker 18.03. 1 ...

随机推荐

  1. Indellij IDEA的菜单 File Edit View等主菜单栏不小心删除,恢复的解决办法

    修改以后保存,重启Idea

  2. vue install 组件

    import share from './index.vue' export default { install: (Vue) => { Vue.prototype.$share = (opti ...

  3. 在ensp上实现ospf与acl综合应用实例

    acl命令主要是进行控制 我们搭建一下拓扑图 实验内容 分析:1.我们需要规划多个ospf域 2.财务和研发部所在的区域不受其他区域链路不稳定性影响 3.在R1,R2,R3上设置acl规则,限制只有I ...

  4. SQL2014做数据库主从镜像备份(也可以用于高可用)备忘(非域控)。

    部份内容参考原始文章链接:https://www.cnblogs.com/stragon/p/5643754.html ,同时比较有参考价值的文章:https://blog.csdn.net/sqls ...

  5. 微信公众号开发 token 验证程序

    <?php traceHttp(); define("TOKEN", "gmll001"); $wechatObj = new wechatCallbac ...

  6. RWMutex:共享/专有的递归互斥锁

    具有共享/独占访问权限,且具有升级/降级功能的互斥锁 介绍 我的目标是创建可以充当读/写锁定机制的对象.任何线程都可以锁定它以进行读取,但是只有一个线程可以锁定它以进行写入.在写入线程释放它之前,所有 ...

  7. 【leetcode】590. N-ary Tree Postorder Traversal

    Recurisve: /* // Definition for a Node. class Node { public: int val; vector<Node*> children; ...

  8. webpack4基础入门操作(二)(讲解下webpack的配置内容)

    前序:我之所以开始写这个系列,是因为我最近出去看了下外面的情况,发现技术更新的脚步太快了.我的技术栈已经完全落伍了. 所以准备今年学习写新的东西,而React.webPack4就是我的第一步.前面我看 ...

  9. 魔法 [线段树优化DP]

    也许更好的阅读体验 \(\mathcal{Description}\) 小 \(D\) 正在研究魔法. 小 \(D\) 得到了远古时期的魔法咒语 \(S\),这个咒语共有 \(n\) 个音节,每个音节 ...

  10. springboot 通过@WebFilter(urlPatterns )配置Filter过滤路径

    springboot 通过@WebFilter(urlPatterns )配置Filter过滤路径,没有配置/*,输入任何路径都能进过滤器 2019年04月25日 12:51:33 peigui.hu ...