“Docker-compose部署wordpress”的版本间的差异
跳到导航
跳到搜索
第69行: | 第69行: | ||
[https://www.jianshu.com/p/3cb0d72ddfbb docker-compose实战: 部署wordpress] | [https://www.jianshu.com/p/3cb0d72ddfbb docker-compose实战: 部署wordpress] | ||
+ | |||
+ | |||
+ | [https://yq.aliyun.com/articles/583768 使用docker搭建wordpress网站] | ||
[[category:容器]][[category: container]] | [[category:容器]][[category: container]] |
2019年10月15日 (二) 10:05的版本
install Docker
https://github.com/docker/compose/releases/download/1.24.0/docker-compose-linux-x86_64
下载版源码
p182 这个感觉比较有意思了
wordpres源码下载
https://cn.wordpress.org/download/ curl https://wordpress.org/latest.tar.gz | tar -xvzf -
一次性过的
mkdir Wordpress;cd wordpress vi docker-compose.yml version: "3" services: db: image: mysql:5.7 volumes: - db_data:/var/lib/mysql restart: always environment: MYSQL_ROOT_PASSWORD: somewordpress MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress wordpress: depends_on: - db image: wordpress:latest ports: - "8000:80" restart: always environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD: wordpress volumes: db_data: docker-compose up -d #运行
解说
开启一个 wordpress 服务和一个独立的 MySQL 实例 ports: - "8000:80" 容器的80端口暴露到机器的8000
http://192.168.88.51:8000/wp-admin/install.php