docker下的个人博客wordpress搭建

Docker的安装以及使用,官网可以直接看到

提供下官方的docker安装地址

使用docker-compose完成快速搭建

docker-compose.yml文件内容

version: '3' services: mariadb-wordPress: image: mariadb container_name: mariadb-wordPress restart: always environment: - "TZ=Asia/Shanghai" - "MYSQL_DATABASE=wordPress" - "MYSQL_USER=username" - "MYSQL_PASSWORD=pwd" - "MYSQL_ROOT_PASSWORD=pwd" volumes: - "./data/mariadb-wordPress:/var/lib/mariadb" ports: - 10081:3306 networks: - myWordPress wordPress: image: wordpress:latest container_name: wordPress restart: always ports: - 10080:80 environment: - "TZ=Aisa/Shanghai" - "WORDPRESS_DB_HOST=mariadb-wordPress" - "WORDPRESS_DB_NAME=wordPress" - "WORDPRESS_DB_USER=username" - "WORDPRESS_DB_PASSWORD=pwd" networks: - myWordPress networks: myWordPress: 

通过启动docker服务,即可快速创建wordpress应用
-f 文件名
-d 后台运行不停止

docker-compose -f docker-compose.yml up -d 

访问 ip:10080 (ex: 192.168.0.111:10080/)即可进入到配置界面,根据wordpress的指引完成即可

原文链接:https://blog.csdn.net/snow__falling/article/details/114443867?ops_request_misc=&request_id=035132eb9a144cc188f89df76e697da9&biz_id=&utm_medium=distribute.pc_search_result.none-task-blog-2~blog~koosearch~default-3-114443867-null-null.268%5Ev1%5Econtrol&utm_term=docker%E3%80%81wordpress%E3%80%81wordpress%E5%BB%BA%E7%AB%99%E3%80%81wordpress%E4%B8%BB%E9%A2%98%E3%80%81%E5%AE%B9%E5%99%A8%E9%95%9C%E5%83%8F%E3%80%81

© 版权声明
THE END
喜欢就支持一下吧
点赞5 分享