32

Docker安装MySQL Tomcat Python Redis MongoDB Apache-李世龙

 5 years ago
source link: http://blog.51cto.com/lwm666/2149759
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
这里我们拉取官方的镜像,标签为5.6runoob@runoob:~/mysql$ docker pull mysql:5.6等待下载完成后,我们就可以在本地镜像列表里查到REPOSITORY为mysql,标签为5.6的镜像。runoob@runoob:~/mysql$ docker images |grep mysqlmysql 5.6 2c0964ec182a 3 weeks ago 329 MB方法二、通过 Dockerfile构建创建Dockerfile首先,创建目录mysql,用于存放后面的相关东西。runoob@runoob:~$ mkdir -p ~/mysql/data ~/mysql/logs ~/mysql/confdata目录将映射为mysql容器配置的数据文件存放路径logs目录将映射为mysql容器的日志目录conf目录里的配置文件将映射为mysql容器的配置文件进入创建的mysql目录,创建DockerfileFROM debia

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK