美文网首页
19-Linux Dockerfile构建自定义pxc镜像

19-Linux Dockerfile构建自定义pxc镜像

作者: 吕小凯 | 来源:发表于2020-04-24 18:55 被阅读0次
1.创建本地的my.cnf文件
!include /etc/mysql/node.cnf
!includedir /etc/my.cnf.d/
!includedir /etc/percona-xtradb-cluster.conf.d/

[mysqld]
sql_mode=STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
2.创建Dockerfile

vim Dockerfile

FROM pxc:latest
MAINTAINER Fisher "lvxiaokai@aliyun.com"
COPY ./my.cnf /etc/
3.开始构建本地镜像

docker build -t pxc2 .

4.启动容器会发现配置文件已经改成我们自定义后的了

相关文章

网友评论

      本文标题:19-Linux Dockerfile构建自定义pxc镜像

      本文链接:https://www.haomeiwen.com/subject/ngnkwhtx.html