Docker-compose部署wordpress
docker>Evan2019年5月21日 (二) 14:42的版本 (→see also)
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