原文链接:http://www.cnblogs.com/yueyue184/p/10303210.html原文链接:http://www.cnblogs.com/yueyue184/p/10303210.htmldocker真的是个好东西。version: 3.1services:db:container_name: dbimage: mysql/mysql-serverrestart: alwaysnetworks:- blogNetenvironment:MYSQL_...
docker真的是个好东西。
version: '3.1' services: db: container_name: db image: mysql/mysql-server restart: always networks: - "blogNet" environment: MYSQL_ROOT_PASSWORD: pwd123456 volumes: - /Docker/mysql/init:/docker-entrypoint-initdb.d - /Docker/mysql/config/my.cnf:/etc/mysql/my.cnf - /Docker/mysql/data:/var/lib/mysql wordpress: container_name: blog image: wordpress restart: always ports: - 10000:80 environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: liudehua WORDPRESS_DB_PASSWORD: pwd123 networks: - "blogNet" volumes: - /Docker/wordpress/html:/var/www/html depends_on: - db networks: blogNet: driver: bridge
docker-compose file
转载于:https://www.cnblogs.com/yueyue184/p/10303210.html
沃梦达教程
本文标题为:[原创]docker-compose yaml mysql和wordpress 一行命令搞定~~~
基础教程推荐
猜你喜欢
- 织梦DedeCMS搜索指定多个栏目文档的办法 2022-11-11
- dedecms根据来访IP区域自动跳转对应页面的方法 2022-07-21
- dedecms织梦无需登录注册可下单购买的修改 2022-11-04
- pbootcms网站自动清理runtime缓存方法 2023-07-09
- 织梦dedecms调用当前栏目文章数的方法 2022-11-08
- PbootCMS网站标题描述等标签限制字数的办法 2023-07-08
- pbootcms二次开发必须要了解的后台目录结构 2023-07-09
- dedecms织梦全局变量调用方法总结 2023-07-08
- dedecms织梦cms常用判断语句汇总 2022-06-24
- 织梦dedecms如何在dede:sql中使用[field:global.autoindex/] 2022-08-27