使用Docker搭建Wordpress
docker network create wordpress-network
docker run -d \
--name mysql \
-e MYSQL_ROOT_PASSWORD=123456 \
-e MYSQL_DATABASE=wordpress_db \
-e MYSQL_USER=wordpress \
-e MYSQL_PASSWORD=123456 \
--network wordpress-network \
-p 3306:3306 \
--restart=always \
mysql:5.7.37
docker run -d \
--name wordpress \
-e WORDPRESS_DB_HOST=mysql \
-e WORDPRESS_DB_USER=wordpress \
-e WORDPRESS_DB_PASSWORD=123456 \
--network wordpress-network \
--restart=always \
-p 80:80 \
wordpress:latest
apt install vim
apt install iputils-ping
vim /var/www/html/wp-config.php