Docker 在 Ubuntu 机器上运行良好。然后,Java 版本因不同的原因而更新。
现在,突然之间 docker 不再运行了。
尝试了不同的方法来恢复,但没有用。任何指针都会有所帮助。谢谢。
$ sudo systemctl start docker
Job for docker.service failed because the control process exited with error code.
Run Code Online (Sandbox Code Playgroud)
$ systemctl status docker.service
? docker.service - LSB: Create lightweight, portable, self-sufficient containers.
Loaded: loaded (/etc/init.d/docker; generated)
Drop-In: /etc/systemd/system/docker.service.d
??10_docke_proxy.conf
Active: failed (Result: exit-code) since Thu 2020-04-23 17:06:05 EDT; 11s ago
Docs: man:systemd-sysv-generator(8)
Process: 8962 ExecStart=/etc/init.d/docker start (code=exited, status=1/FAILURE)
Main PID: 2746 (code=exited, status=0/SUCCESS)
Apr 23 17:06:05 ******** systemd[1]: Starting LSB: Create lightweight, portable, self-sufficient containers....
Apr 23 17:06:05 ******** docker[8962]: * /usr/bin/dockerd not present or not executable
Apr 23 17:06:05 ******** systemd[1]: docker.service: Control process exited, code=exited status=1
Apr 23 17:06:05 ******** systemd[1]: docker.service: Failed with result 'exit-code'.
Run Code Online (Sandbox Code Playgroud)
Zol*_*üle 16
这对我有用:
$ sudo apt remove docker
$ sudo apt install docker docker-ce
Run Code Online (Sandbox Code Playgroud)
我建议大家遵循官方文档。首先删除所有旧库,然后添加 GPG 密钥,然后安装该库的稳定版本。
小智 9
最后使用这个固定。
wget -qO- https://get.docker.com/ | sh
Run Code Online (Sandbox Code Playgroud)
这是输出
# Executing docker install script, commit: 26ff363bcf3b3f5a00498ac43694bf1c7d9ce16c
Warning: the "docker" command appears to already exist on this system.
If you already have Docker installed, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the
installation.
If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.
You may press Ctrl+C now to abort this script.
+ sleep 20
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/ubuntu/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sh -c echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
W: Target Packages (stable/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/docker.list:1
W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/docker.list:1
W: Target Translations (stable/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/docker.list:1
W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/docker.list:1
W: Target CNF (stable/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/docker.list:1
W: Target CNF (stable/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/docker.list:1
W: Target Packages (stable/binary-amd64/Packages) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/docker.list:1
W: Target Packages (stable/binary-all/Packages) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/docker.list:1
W: Target Translations (stable/i18n/Translation-en_US) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/docker.list:1
W: Target Translations (stable/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/docker.list:1
W: Target CNF (stable/cnf/Commands-amd64) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/docker.list:1
W: Target CNF (stable/cnf/Commands-all) is configured multiple times in /etc/apt/sources.list:56 and /etc/apt/sources.list.d/docker.list:1
+ [ -n ]
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
+ sh -c docker version
Client: Docker Engine - Community
Version: 19.03.12
API version: 1.40
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:45:36 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.12
API version: 1.40 (minimum version 1.12)
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:44:07 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:
sudo usermod -aG docker your-user
Remember that you will have to log out and back in for this to take effect!
WARNING: Adding a user to the "docker" group will grant the ability to run
containers which can be used to obtain root privileges on the
docker host.
Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
for more information.
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
5587 次 |
| 最近记录: |