当前位置: 首页 > 编程文章 >

Ubuntu 17.10下Docker CE安装指南

Ubuntu 17.10下Docker CE安装指南

作者:沈言时间:2026-09-28 14:23:31浏览:888

本文记录了在Ubuntu 17.10环境下安装Docker CE的具体步骤。安装前需确认系统为64位且符合支持的版本列表,其中Artful仅支持Docker CE 17.11 Edge及以上版本。主要流程包括更新apt源、安装https传输等依赖包、添加官方GPG密钥并验证指纹,最后配置stable仓库并完成安装。

本文目录展开

Ubuntu 17.10下Docker CE安装指南

本记录旨在说明如何在Ubuntu 17.10系统中部署Docker CE环境。

前置依赖检查

在Ubuntu平台上运行Docker CE需满足特定的硬件与软件限制条件。

操作系统架构必须为64位。

系统必须是64位的Ubuntu OS,可通过特定命令进行核实。


devops@ubuntu:~$ uname -m
x86_64
devops@ubuntu:~$

版本兼容性

官方支持以下版本的Ubuntu系统:

  • Artful 17.10
  • Xenial 16.04 (LTS)
  • Trusty 14.04 (LTS)

特别提示:由于Artful 17.10属于过渡版本(预计2026年10月发行),因此它仅兼容Docker CE 17.11 Edge及后续更高版本。

可以通过执行命令来确认当前的发行代码,例如查看是否为Artful。


devops@ubuntu:~$ lsb_release -cs
artful
devops@ubuntu:~$

硬件架构要求

除了要求64位操作系统外,Docker CE对CPU架构也有明确要求。除常见的x86架构外,还支持以下类型:

  • armhf
  • s390x(IBM Z系列)
  • ppc64le(IBM Power系列)

devops@ubuntu:~$ uname -m
x86_64
devops@ubuntu:~$

安装准备

执行apt-get update

首先使用apt-get update命令刷新本地软件源列表,确保获取最新的包信息。


devops@ubuntu:~$ sudo su
[sudo] password for devops: 
root@ubuntu:/home/devops# apt-get update
Hit:1 http://cn.archive.ubuntu.com/ubuntu artful InRelease         
Get:2 http://cn.archive.ubuntu.com/ubuntu artful-updates InRelease [78.6 kB]             
Hit:3 http://cn.archive.ubuntu.com/ubuntu artful-backports InRelease          
Get:4 http://security.ubuntu.com/ubuntu artful-security InRelease [78.6 kB]
Get:5 http://cn.archive.ubuntu.com/ubuntu artful-updates/main i386 Packages [212 kB]
Get:6 http://cn.archive.ubuntu.com/ubuntu artful-updates/main amd64 Packages [216 kB]
Get:7 http://cn.archive.ubuntu.com/ubuntu artful-updates/universe i386 Packages [89.0 kB]
Get:8 http://cn.archive.ubuntu.com/ubuntu artful-updates/universe amd64 Packages [89.9 kB]
Fetched 764 kB in 4s (163 kB/s)                        
Reading package lists... Done
root@ubuntu:/home/devops#

安装必要软件包

需要安装用于安全传输和证书验证的工具,具体命令为:apt-get install apt-transport-https ca-certificates curl software-properties-common

该过程的终端输出日志如下。


root@ubuntu:/home/devops# apt-get install apt-transport-https ca-certificates curl software-properties-common
Reading package lists... Done
Building dependency tree    
Reading state information... Done
ca-certificates is already the newest version (20260717).
software-properties-common is already the newest version (0.96.24.17).
The following additional packages will be installed:
 libcurl3
The following NEW packages will be installed:
 apt-transport-https
The following packages will be upgraded:
 curl libcurl3
2 upgraded, 1 newly installed, 0 to remove and 53 not upgraded.
Need to get 383 kB of archives.
After this operation, 247 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://cn.archive.ubuntu.com/ubuntu artful-updates/main amd64 apt-transport-https amd64 1.5.1 [34.7 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu artful-updates/main amd64 curl amd64 7.55.1-1ubuntu2.3 [152 kB]               
Get:3 http://cn.archive.ubuntu.com/ubuntu artful-updates/main amd64 libcurl3 amd64 7.55.1-1ubuntu2.3 [196 kB]             
Fetched 383 kB in 14s (26.2 kB/s)                                                   
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
  LANGUAGE = "en_HK:en",
  LC_ALL = (unset),
  LC_CTYPE = "UTF-8",
  LANG = "en_HK.UTF-8"
  are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_HK.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package apt-transport-https.
(Reading database ... 63866 files and directories currently installed.)
Preparing to unpack .../apt-transport-https_1.5.1_amd64.deb ...
Unpacking apt-transport-https (1.5.1) ...
Preparing to unpack .../curl_7.55.1-1ubuntu2.3_amd64.deb ...
Unpacking curl (7.55.1-1ubuntu2.3) over (7.55.1-1ubuntu2.2) ...
Preparing to unpack .../libcurl3_7.55.1-1ubuntu2.3_amd64.deb ...
Unpacking libcurl3:amd64 (7.55.1-1ubuntu2.3) over (7.55.1-1ubuntu2.2) ...
Setting up apt-transport-https (1.5.1) ...
Setting up libcurl3:amd64 (7.55.1-1ubuntu2.3) ...
Processing triggers for libc-bin (2.26-0ubuntu2) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up curl (7.55.1-1ubuntu2.3) ...
root@ubuntu:/home/devops#

导入GPG密钥

为了验证下载包的真实性,需添加Docker官方的GPG签名密钥。

执行命令:curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

终端返回的执行日志显示操作成功。


root@ubuntu:/home/devops# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
OK
root@ubuntu:/home/devops#

该密钥的数字签名为9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88,用户可使用其后8位字符“0EBFCD88”来快速核对密钥指纹。


root@ubuntu:/home/devops# apt-key fingerprint 0EBFCD88
pub  rsa4096 2026-02-22 [SCEA]
   9DC8 5822 9FC7 DD38 854A E2D8 8D81 803C 0EBF CD88
uid      [ unknown] Docker Release (CE deb) 
sub  rsa4096 2026-02-22 [S]
root@ubuntu:/home/devops#

配置稳定版软件源

针对x86架构的机器,使用以下命令将Docker的稳定版仓库添加到apt源中。

命令:add-apt-repository “deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable”

如果是其他类型的化,对应关系参看如下,将上述命令中的arch=amd64进行替换即可,例如armhf架构对应的值为armhf,而aarch64架构对应的值为arm64

执行上述命令后的日志输出如下。


root@ubuntu:/home/devops# add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
root@ubuntu:/home/devops#

再次执行apt-get update

配置完新源后,再次运行apt-get update以加载Docker仓库的软件包索引。


root@ubuntu:/home/devops# apt-get update
Hit:1 http://cn.archive.ubuntu.com/ubuntu artful InRelease            
Get:2 http://security.ubuntu.com/ubuntu artful-security InRelease [78.6 kB]    
Get:3 http://cn.archive.ubuntu.com/ubuntu artful-updates InRelease [78.6 kB]                      
Hit:4 http://cn.archive.ubuntu.com/ubuntu artful-backports InRelease                      
Get:5 https://download.docker.com/linux/ubuntu artful InRelease [51.9 kB]
Get:6 https://download.docker.com/linux/ubuntu artful/stable amd64 Packages [1462 B]
Fetched 211 kB in 2s (85.8 kB/s)
Reading package lists... Done
root@ubuntu:/home/devops#

安装Docker CE


root@ubuntu:/home/devops# apt-get install docker-ce
Reading package lists... Done
Building dependency tree    
Reading state information... Done
The following additional packages will be installed:
 aufs-tools cgroupfs-mount libltdl7
The following NEW packages will be installed:
 aufs-tools cgroupfs-mount docker-ce libltdl7
0 upgraded, 4 newly installed, 0 to remove and 53 not upgraded.
Need to get 29.9 MB of archives.
After this operation, 150 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://cn.archive.ubuntu.com/ubuntu artful-updates/universe amd64 aufs-tools amd64 1:4.1+20261219-1ubuntu0.1 [102 kB]
Get:2 https://download.docker.com/linux/ubuntu artful/stable amd64 docker-ce amd64 17.12.1~ce-0~ubuntu [29.8 MB]
Get:3 http://cn.archive.ubuntu.com/ubuntu artful/universe amd64 cgroupfs-mount all 1.4 [6320 B]
Get:4 http://cn.archive.ubuntu.com/ubuntu artful/main amd64 libltdl7 amd64 2.4.6-2 [38.8 kB]
Fetched 29.9 MB in 8s (3536 kB/s)                                                   
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
  LANGUAGE = "en_HK:en",
  LC_ALL = (unset),
  LC_CTYPE = "UTF-8",
  LANG = "en_HK.UTF-8"
  are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_HK.UTF-8").
locale: Cannot set LC_CTYPE to default locale: No such file or directory
locale: Cannot set LC_ALL to default locale: No such file or directory
Selecting previously unselected package aufs-tools.
(Reading database ... 63874 files and directories currently installed.)
Preparing to unpack .../aufs-tools_1%3a4.1+20261219-1ubuntu0.1_amd64.deb ...
Unpacking aufs-tools (1:4.1+20261219-1ubuntu0.1) ...
Selecting previously unselected package cgroupfs-mount.
Preparing to unpack .../cgroupfs-mount_1.4_all.deb ...
Unpacking cgroupfs-mount (1.4) ...
Selecting previously unselected package libltdl7:amd64.
Preparing to unpack .../libltdl7_2.4.6-2_amd64.deb ...
Unpacking libltdl7:amd64 (2.4.6-2) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../docker-ce_17.12.1~ce-0~ubuntu_amd64.deb ...
Unpacking docker-ce (17.12.1~ce-0~ubuntu) ...
Setting up aufs-tools (1:4.1+20261219-1ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-20) ...
Setting up cgroupfs-mount (1.4) ...
Processing triggers for libc-bin (2.26-0ubuntu2) ...
Processing triggers for systemd (234-2ubuntu12.1) ...
Setting up libltdl7:amd64 (2.4.6-2) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up docker-ce (17.12.1~ce-0~ubuntu) ...
Created symlink /etc/systemd/system/multi-user.target.wants/docker.service → /lib/systemd/system/docker.service.
Created symlink /etc/systemd/system/sockets.target.wants/docker.socket → /lib/systemd/system/docker.socket.
Processing triggers for ureadahead (0.100.0-20) ...
Processing triggers for libc-bin (2.26-0ubuntu2) ...
Processing triggers for systemd (234-2ubuntu12.1) ...
root@ubuntu:/home/devops#

指定版本安装方法

若需安装特定版本,可在安装命令中明确指定版本号,例如docker-ce=17.12.1~ce-0~ubuntu。


root@ubuntu:/home/devops# apt-cache madison docker-ce
 docker-ce | 17.12.1~ce-0~ubuntu | https://download.docker.com/linux/ubuntu artful/stable amd64 Packages
 docker-ce | 17.12.0~ce-0~ubuntu | https://download.docker.com/linux/ubuntu artful/stable amd64 Packages
root@ubuntu:/home/devops#
root@ubuntu:/home/devops# apt-get install docker-ce=17.12.1~ce-0~ubuntu
Reading package lists... Done
Building dependency tree    
Reading state information... Done
docker-ce is already the newest version (17.12.1~ce-0~ubuntu).
0 upgraded, 0 newly installed, 0 to remove and 53 not upgraded.
root@ubuntu:/home/devops#

安装后验证

版本信息检查


root@ubuntu:/home/devops# docker version
Client:
 Version:  17.12.1-ce
 API version:  1.35
 Go version:  go1.9.4
 Git commit:  7390fc6
 Built: Tue Feb 27 22:17:53 2026
 OS/Arch:  linux/amd64
Server:
 Engine:
 Version: 17.12.1-ce
 API version: 1.35 (minimum version 1.12)
 Go version:  go1.9.4
 Git commit:  7390fc6
 Built:  Tue Feb 27 22:16:25 2026
 OS/Arch: linux/amd64
 Experimental: false
root@ubuntu:/home/devops#

通过查询整体信息可以了解Docker的运行状态。

从输出结果中可以观察到多项基础配置详情,例如存储驱动被设置为overlay2。


root@ubuntu:/home/devops# docker info
Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 0
Server Version: 17.12.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: 9b55aab90508bd389d7654c4baf173a981477d55
runc version: 9f9c96235cc97674e935002fc3d78361b696a69e
init version: 949e6fa
Security Options:
 apparmor
 seccomp
 Profile: default
Kernel Version: 4.13.0-21-generic
Operating System: Ubuntu 17.10
OSType: linux
Architecture: x86_64
CPUs: 1
Total Memory: 988.7MiB
Name: ubuntu
ID: TYYA:4LWB:YTHA:2DNB:XBXM:NFNP:ADMY:VZEJ:2ZBN:KPKW:PTML:S5A2
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
root@ubuntu:/home/devops#

参考资料

https://docs.docker.com/install/linux/docker-ce/ubuntu/

总结

以上内容涵盖了在Ubuntu下安装Docker CE的全部关键步骤,希望对读者的学习或工作有所帮助。如需获取更多相关技术资讯,请查阅本站的其他链接。

上一篇
Linux Web服务器故障排查常用命令汇总

本文整理了Linux环境下Web服务器故障分析的常用命令,涵盖系统连接状态监控、Apache与Squid日志分析、数据库SQL追踪及进程调试等场景。通过netstat、tcpdump、awk等工具组合,可快速定位TCP连接异常、高并发IP来源、慢查询页面及HTTP状态码分布,帮助运维人员高效诊断网站性能瓶颈与安全威胁。

下一篇
Linux部署Grafana并接入InfluxDB实现监控

本文介绍在Linux环境下通过Ubuntu安装包部署Grafana,并利用其HTTP API向InfluxDB写入和查询数据。详细演示了如何添加InfluxDB数据源,以及将采集到的Web访问日志(如404状态码)绘制为实时折线图的全过程。

相关文章

更多
Ubuntu 17.10 安装 Docker CE 的方法

本文介绍在 Ubuntu 17.10 系统中安装 Docker CE 的具体方法。由于官网标准步骤在该版本中可能提示缺少安装源,需使用特定的 apt 仓库地址进行配置。操作前建议先查询并卸载已存在的旧版 Docker,注意保留 /var/lib/docker 下的数据。通过添加正确的 GPG 密钥和软件源,即可完成 docker-ce 的安装与验证。

2026.02.05 342
Ubuntu系统安装Docker完整指南

本文介绍在Ubuntu 14.04、16.04及16.10等64位版本中安装Docker的方法。主要涵盖通过官方APT仓库安装推荐方式,包括添加GPG密钥、配置源及指定版本安装;同时也提供下载DEB包手动安装的替代方案,并说明如何验证安装、升级及卸载Docker引擎。

2026.10.27 967
Ubuntu 16.10 安装 Docker CE 完整指南

本文介绍在 Ubuntu 16.10 系统中安装 Docker CE 的具体步骤。首先验证并安装 curl 工具,随后配置 Docker 官方 GPG 密钥及 APT 存储库。接着执行安装命令获取最新版本,并通过运行 hello-world 镜像验证安装成功。最后通过创建 docker 组并将当前用户加入该组,实现无需 sudo 权限即可使用 Docker 命令。

2025.01.30 879
Windows Server 2026中文版安装Docker详细步骤

本文介绍在Windows Server 2026中文版环境中部署Docker的完整流程。操作需先通过sconfig更新系统补丁,并在PowerShell中配置TLS 1.2协议以支持NuGet服务。随后利用DockerMsftProvider模块安装Docker包,最后重启并验证版本信息。

2026.03.14 527
CentOS 安装指定版本 Docker CE 指南

自 2026 年 3 月起,Docker 分为社区版(CE)和企业版(EE),本文聚焦于免费版的安装。通过配置阿里云镜像源、更新 Yum 缓存并查询可用版本列表,用户可精准定位如 17.03.2.ce 等特定版本进行安装。若遇 docker-ce-selinux 依赖报错,可通过直接安装对应 RPM 包解决,确保环境稳定运行。

2026.05.28 265
CentOS 7+ 使用 YUM 安装 Docker CE 完整指南

本文介绍在 CentOS 7.0 及以上版本系统中,通过 YUM 源安装 Docker CE(社区版)的具体步骤。内容涵盖环境检查、旧版本清理、依赖工具安装、阿里云镜像源配置、服务启动及开机自启设置,并详细解析了容器重启策略 --restart=always 的参数含义与更新方法,帮助用户快速完成 Docker 环境的部署与基础配置。

2026.08.23 217

专题推荐

更多
PHP 类与对象定义及继承

先看类声明、对象实例与属性访问。理解对象的创建和销毁后,再读继承、方法重载和关键字对照。已有代码遇到继承行为差异时,可进一步查看 final 方法与反射实例。

PHP 定时任务配置与运行

先确定任务运行间隔以及是否允许重叠。固定时间触发先看 Cron 案例,框架内和常驻服务再读对应示例。

Yii2 队列配置与常驻运行

先用一个最小任务跑通入队和消费,再检查 Web 与 Console 是否加载了相同的队列配置。确认命令能手动运行后再配置 Supervisor,最后验证进程重启时的处理情况。

PHP Session 过期时间设置方法

浏览器关闭、服务端回收和业务规定的闲置超时,可能在不同时间发生。对照配置项与应用层时间戳的做法,检查会话何时仍可读、何时应要求重新登录。

PHP URL 编码和解码方法

URL 路径片段和查询参数对空格的处理方式不同。先比较 urlencode 与 rawurlencode,再沿解码过程核对中文、加号和百分号,检查地址是否被重复编码或提前解码。

在线工具箱

更多
键码查询
键码查询

按下键盘按键时查看浏览器记录的键名和事件信息。

.env 配置检查
.env 配置检查

本地检查 .env 键值语法、引号、重复键及空值,预览解析结果,辅助排查 PHP 和 Laravel 环境配置。

进制转换
进制转换

转换二进制、十进制、十六进制等数值表示,辅助程序调试与进制学习。

HTML 标签安全清理
HTML 标签安全清理

清理 HTML 片段中的标签或危险内容,辅助整理待展示的文本。

文件 Base64 转换
文件 Base64 转换

把文件转为 Base64 文本,也可将编码内容还原为文件,方便接口传输与调试。