Docker 安装 Mysql5.7
Docker 安装
系统版本: CentOS Linux release 7.5.1804 (Core)
如果之前有装过 docker 可以先卸载旧版本再安装, 没有则跳过.
yum remove docker docker-client docker-client-latest docker-common docker-latest docker-latest-logrotate docker-logrotate docker-engine
安装软件包:
yum install -y yum-utils device-mapper-persistent-data lvm2
设置镜像仓库:
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
安装 docker:
yum install -y docker-ce docker-ce-cli containerd.io
启动 docker:
systemctl start docker
可以进行测试:# docker run hello-world
Unableto find image'hello-world:latest'locally
latest:Pullingfromlibrary/hello-world
1b930d010525:Pullcomplete
Digest:sha256:fc6a51919cfeb2e6763f62b6d9e8815acbf7cd2e476ea353743570610737b752
Status:Downloadednewer imageforhello-world:latest
HellofromDocker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.2.TheDockerdaemon pulled the"hello-world"imagefromtheDockerHub.
(amd64)
3.TheDockerdaemon created anewcontainerfromthat image which runs the
executable that produces the output you are currently reading.4.TheDockerdaemon streamed that output to theDockerclient,which sent it
to your termi
来源: http://www.bubuko.com/infodetail-3448366.html