Docker 安装 MySQL
方法一、docker pull mysql
查找Docker Hub上的mysql镜像
[Bash shell] 纯文本查看 复制代码
01
02
03
04
05
06
07
08
09
10
11
12
|
runoob@runoob: /mysql $ docker search mysql
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
mysql MySQL is a widely used, open - source relati... 2529 [OK]
mysql /mysql-server Optimized MySQL Server Docker images. Crea... 161 [OK]
centurylink /mysql Image containing mysql. Optimized to be li... 45 [OK]
sameersbn /mysql 36 [OK]
google /mysql MySQL server for Google Compute Engine 16 [OK]
appcontainers /mysql Centos /Debian Based Customizable MySQL Con... 8 [OK]
marvambass /mysql MySQL Server based on Ubuntu 14.04 6 [OK]
drupaldocker /mysql MySQL for Drupal 2 [OK]
azukiapp /mysql Docker image to run MySQL by Azuki - http:... 2 [OK]
...
|
这里我们拉取官方的镜像,标签为5.6
[Bash shell] 纯文本查看 复制代码
1
|
runoob@runoob:~ /mysql $ docker pull mysql:5.6
|
等待下载完成后,我们就可以在本地镜像列表里查到REPOSITORY为mysql,标签为5.6的镜像。
[Bash shell] 纯文本查看 复制代码
1
2
|
runoob@runoob:~ /mysql $ docker images | grep mysql
mysql 5.6 2c0964ec182a 3 weeks ago 329 MB
|