在运行CentOS7的Docker时,可以参考官方网站
DockerHub的评论
- centos Repository | Docker Hub Registry – Repositories of Docker Images
全體成員
- CentOS/CentOS-Dockerfiles · GitHub
MariaDB
- CentOS-Dockerfiles/mariadb/centos7 at master · CentOS/CentOS-Dockerfiles · GitHub
注意到的地方
当我进一步思考时,我开始觉得需要特权和安装systemd本身就是错的。未来可能无法运行方便的工具。
不推荐用于生产使用
> Launching MariaDB
>
> Quick start (not recommended for production use):
>
> # docker run --name=mariadb -d -p 3306:3306 <yourname>/mariadb
建议初步开始
> Recommended start
>
> To use a separate data volume for /var/lib/mysql (recommended, to allow image update without losing database contents):
>
> Create a data volume container: (it doesn't matter what image you use here, we'll never run this container again; it's just here to reference the data volume)
>
> # docker run --name=mariadb-data -v /var/lib/mysql <yourname>/mariadb true
> Initialise it using a temporary one-time mariadb container:
>
> # docker run -rm --volumes-from=mariadb-data <yourname>/mariadb /config_mariadb.sh
> And now create the new persistent mariadb container:
>
> # docker run --name=mariadb -d -p 3306:3306 --volumes-from=mariadb-data <yourname>/mariadb
- データ保管用コンテナをつくれということか。