Skip to content

Instantly share code, notes, and snippets.

@swt02026
Last active September 19, 2020 06:14
Show Gist options
  • Save swt02026/643f7c3f6f8ccb3046c6bdac3a4b6110 to your computer and use it in GitHub Desktop.
Save swt02026/643f7c3f6f8ccb3046c6bdac3a4b6110 to your computer and use it in GitHub Desktop.
create wordpress in docker network
docker network create wp
docker run -itd --name db1 --network wp \
-v /docker_data/db1:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=Redhat1! \
-e TZ="Asia/Taipei" mariadb --character-set-server=utf8mb4 \
--collation-server=utf8mb4_unicode_ci
docker run -it --name wordpress -p 80:80 --network wp \
-v /docker_data/wordpress:/var/www/html \
-e WORDPRESS_DB_NAME=wp \
-e WORDPRESS_DB_USER=root \
-e WORDPRESS_DB_PASSWORD=Redhat1! \
-e WORDPRESS_DB_HOST=db1:3306 \
-d wordpress
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment