使用Docker搭建Wordpress

使用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 \
    -e WORDPRESS_DB_NAME=wordpress_db \
    --network wordpress-network \
    --restart=always \
    -p 80:80 \
    wordpress:latest
apt install vim
apt install iputils-ping

vim /var/www/html/wp-config.php
posted @ 2022-02-04 21:18  GreeneGe  阅读(47)  评论(0编辑  收藏  举报

https://github.com/Glf9832