如何解決docker無法啟動的問題
更新時間:2023年09月05日 10:15:47 作者:早起吃蟲蟲
這篇文章主要介紹了如何解決docker無法啟動的問題,具有很好的參考價值,希望對大家有所幫助,如有錯誤或未考慮完全的地方,望不吝賜教
docker無法啟動問題
由于下載jenkins出現(xiàn)問題TLS handshark timeout
用了網(wǎng)上的一個方法
$ echo "DOCKER_OPTS=\"\$DOCKER_OPTS --registry-mirror=http://f2d6cb40.m.daocloud.io\"" | sudo tee -a /etc/default/docker
導(dǎo)致docker無法啟動
sudo service docker restart
Job for docker.service failed because the control process exited with error code. See "systemctl status docker.service" and "journalctl -xe" for details.
root@zhangyuan7-Lenovo-XiaoXin-700-15ISK:/etc/docker# systemctl status docker.service
● docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since 四 2018-04-26 14:23:53 CST; 1min 23s ago
Docs: https://docs.docker.com
Process: 5210 ExecStart=/usr/bin/dockerd -H fd:// $DOCKER_OPTS (code=exited, status=1/FAILURE)
Main PID: 5210 (code=exited, status=1/FAILURE)
4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK dockerd[5210]: --tlskey string Path to TLS key file (default "/root/.docker/key.pem")
4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK dockerd[5210]: --tlsverify Use TLS and verify the remote
4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK dockerd[5210]: --userland-proxy Use userland proxy for loopback traffic (default true)
4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK dockerd[5210]: --userland-proxy-path string Path to the userland proxy binary
4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK dockerd[5210]: --userns-remap string User/Group setting for user namespaces
4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK systemd[1]: Failed to start Docker Application Container Engine.
4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK dockerd[5210]: -v, --version Print version information and quit
4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK dockerd[5210]: Run 'dockerd COMMAND --help' for more information on a command.
4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK systemd[1]: docker.service: Unit entered failed state.
4月 26 14:23:53 zhangyuan7-Lenovo-XiaoXin-700-15ISK systemd[1]: docker.service: Failed with result 'exit-code'.查閱了網(wǎng)上好多方法,都不對癥,好吧,
只有對比能用的服務(wù)器上面的docker配置看看有什么問題,
終于在/etc/default/中的docker文件,
需要把文件中的最后一行注釋掉
# Here in Debian, this file is sourced by: # - /etc/init.d/docker (sysvinit) # - /etc/init/docker (upstart) # - systemd's docker.service # Use of this file for configuring your Docker daemon is discouraged. # The recommended alternative is "/etc/docker/daemon.json", as described in: # https://docs.docker.com/v1.11/engine/reference/commandline/daemon/#daemon-configuration-file # If that does not suit your needs, try a systemd drop-in file, as described in: # https://docs.docker.com/v1.11/engine/admin/systemd/#custom-docker-daemon-options #DOCKER_OPTS="$DOCKER_OPTS --registry-mirror=http://f2d6cb40.m.daocloud.io"
然后重啟
sudo service docker restart
終于可以了??!
總結(jié)
以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關(guān)文章
MySQL中VARCHAR和TEXT的區(qū)別小結(jié)
MySQL中VARCHAR和TEXT用于存儲字符串,VARCHAR可變長度存儲在行內(nèi),適合短文本;TEXT存儲在溢出頁,適合大文本,下面就來具體的了解一下兩者的區(qū)別,感興趣的可以了解一下2025-09-09
Mysql中LAST_INSERT_ID()的函數(shù)使用詳解
從名字可以看出,LAST_INSERT_ID即為最后插入的ID值,有了這個實用的函數(shù),我們可以實現(xiàn)很多問題,下面我們就來深入探討下。2015-03-03
MySQL?數(shù)據(jù)庫表與查詢操作實戰(zhàn)案例
本文將通過實際案例,詳細(xì)介紹?MySQL中數(shù)據(jù)庫表的設(shè)計、數(shù)據(jù)插入以及常用的查詢操作,幫助初學(xué)者快速上手,感興趣的朋友跟隨小編一起看看吧2025-08-08

