1. apt install docker.io -y
2. pip install docker-compose
3. vim wordpress_stack.yml
version: '3.1'
services:
wordpress:
image: wordpress
restart: always
ports:
- 80:80
environment:
WORDPRESS_DB_PASSWORD: mysqlrootpasswd
mysql:
image: mysql:5.7
restart: always
environment:
MYSQL_ROOT_PASSWORD: mysqlrootpasswd4. vim start.sh
#!/bin/bash
docker-compose -f wordpress_stack.yml up -d5. ./start.sh
6. iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
7. 打开http://localhost安装Wordpress
/**
*
* __ (__`\
* (__`\ \\`\
* `\\`\ \\ \
* `\\`\ \\ \
* `\\`\#\\ \#
* \_ ##\_ |##
* (___)(___)##
* (0) (0)`\##
* |~ ~ , \##
* | | \##
* | /\ \## __..---'''''-.._.._
* | | \ `\## _.--' _ `.
* Y | \ `##' \`\ \
* / | \ | `\ \
* /_...___| \ | `\\
* / `. | / ##
* | | | / ####
* | | | / ####
* | () () | \ | | _.-' ##
* `. .' `._. |______..| |-'|
* `------' | | | | | || |
* | | | | | || |
* | | | | | || |
* | | | | | || |
* _____ | | | |____| || |
* / `` |-`/ ` |` |
* \________\__\_______\__\
* """"""""" """""""'"""
* Don't be a fucking stupid donkey! No, this is a fucking mule!
*/
浙公网安备 33010602011771号