本文共 3737 字,大约阅读时间需要 12 分钟。
**解决方案如下: **
[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 Improvedmysql
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/