博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
解决Centos7 Docker成功安装,但启动不了
阅读量:3897 次
发布时间:2019-05-23

本文共 3737 字,大约阅读时间需要 12 分钟。

在Centos7 成功安装,但是启动不了,报错如下:

在这里插入图片描述

[root@localhost ~]# systemctl start docker.service
Job for docker.service failed because the control process exited with error code. See “systemctl status docker.service” and “journalctl -xe” for details.
[root@localhost ~]# service docker start
Redirecting to /bin/systemctl start docker.service
Job for docker.service failed because the control process exited with error code. See “systemctl status docker.service” and “journalctl -xe” for details.

**解决方案如下: **

[root@localhost ~]# yum remove docker
[root@localhost ~]# yum remove docker-selinux
[root@localhost ~]# vi /etc/yum.repos.d/docker.repo
在这个文件里面输入如下:
[dockerrepo]
name=Docker Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/$releasever/
enabled=1
gpgcheck=1
gpgkey=https://yum.dockerproject.org/gpg

接着:

[root@localhost ~]# yum install docker-engine

已安装:

docker-engine.x86_64 0:1.10.2-1.el7.centos

作为依赖被安装:

docker-engine-selinux.noarch 0:1.10.2-1.el7.centos

之后就可以成功启动,如下:

[root@localhost ~]# service docker start
Redirecting to /bin/systemctl start docker.service
[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
[root@localhost ~]# docker -v
Docker version 18.09.6, build 481bc77156
[root@localhost ~]# docker search mysql
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
mysql MySQL is a widely used, open-source relation?? 8123 [OK]
mariadb MariaDB is a community-developed fork of MyS?? 2761 [OK]
mysql/mysql-server Optimized MySQL Server Docker images. Create?? 607 [OK]
zabbix/zabbix-server-mysql Zabbix Server with MySQL database support 192 [OK]
hypriot/rpi-mysql RPi-compatible Docker Image with Mysql 113
zabbix/zabbix-web-nginx-mysql Zabbix frontend based on Nginx web-server wi?? 101 [OK]
centurylink/mysql Image containing mysql. Optimized to be link?? 60 [OK]
centos/mysql-57-centos7 MySQL 5.7 SQL database server 52
1and1internet/ubuntu-16-nginx-php-phpmyadmin-mysql-5 ubuntu-16-nginx-php-phpmyadmin-mysql-5 50 [OK]
mysql/mysql-cluster Experimental MySQL Cluster Docker images. Cr?? 44
tutum/mysql Base docker image to run a MySQL database se?? 31
zabbix/zabbix-web-apache-mysql Zabbix frontend based on Apache web-server w?? 29 [OK]
schickling/mysql-backup-s3 Backup MySQL to S3 (supports periodic backup?? 26 [OK]
bitnami/mysql Bitnami MySQL Docker Image 26 [OK]
zabbix/zabbix-proxy-mysql Zabbix proxy with MySQL database support 22 [OK]
linuxserver/mysql A Mysql container, brought to you by LinuxSe?? 20
centos/mysql-56-centos7 MySQL 5.6 SQL database server 13
mysql/mysql-router MySQL Router provides transparent routing be?? 11
circleci/mysql MySQL is a widely used, open-source relation?? 11
openshift/mysql-55-centos7 DEPRECATED: A Centos7 based MySQL v5.5 image?? 6
dsteinkopf/backup-all-mysql backup all DBs in a mysql server 6 [OK]
jelastic/mysql An image of the MySQL database server mainta?? 1
ansibleplaybookbundle/mysql-apb An APB which deploys RHSCL MySQL 0 [OK]
cloudposse/mysql Improved mysql service with support for `m?? 0 [OK]
widdpim/mysql-client Dockerized MySQL Client (5.7) including Curl?? 0 [OK]
[root@localhost ~]# docker pull mysql
Using default tag: latest
latest: Pulling from library/mysql
743f2d6c1f65: Pull complete
3f0c413ee255: Pull complete
aef1ef8f1aac: Pull complete
f9ee573e34cb: Pull complete
3f237e01f153: Pull complete
f9da32e8682a: Pull complete
4b8da52fb357: Pull complete
3416ca8f6890: Pull complete
786698c2d5de: Pull complete
4ddf84d07bd1: Pull complete
cd3aa23461b6: Pull complete
9f287a2a95ad: Pull complete
Digest: sha256:711df5b93720801b3a727864aba18c2ae46c07f9fe33d5ce9c1f5cbc2c035101
Status: Downloaded newer image for mysql:latest
[root@localhost ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
mysql latest 990386cbd5c0 41 hours ago 443MB

转载地址:http://hnyen.baihongyu.com/

你可能感兴趣的文章
“金9银10”2020年JVM高频率面试题整理,技术提升就差一个点!
查看>>
简简单单的分享2020常见的MySQL面试题MySQL与答案整理
查看>>
听说只有大厂的Android工程师才能全答对这20道题?我看你在吹牛哦!
查看>>
武功秘籍之 Redis 面试题全掌握,学完马上找面试官对线!
查看>>
50道!2020年!!MySQL高频数据库面试题解析,你都懂了吗?
查看>>
如何用Spring Boot加密配置文件中的特殊内容示例代码详解
查看>>
谈谈这些年面试官给大伙下的那些套,如何解?(面试技巧)
查看>>
5年开发经验的我被几条朋友圈打击到,点燃自己冲击阿里面经!
查看>>
5年工作经验的我放弃安逸,一份来自腾讯魔鬼面试的终极考验!
查看>>
学JAVA吗同学,这篇Sping boot 确定不了解下么?
查看>>
(3年+offer)华为技术岗面试初面+综合面试经验总结
查看>>
男默女泪,努力复习的我终于通过社招进入BAT工作了!(JAVA+JVM+框架+中间件+Spring干货分享)
查看>>
Python 导包
查看>>
dok_matrix
查看>>
theano 后端爆内存
查看>>
os.environ 和 keras.json
查看>>
后台面试经典问题-手写LRU算法
查看>>
Part-Guided Attention Learning for Vehicle Instance Retrieval
查看>>
Deep Residual Learning for Image Recognition
查看>>
Bag of Tricks and A Strong Baseline for Deep Person Re-identification
查看>>