Docker build LNMP website platform based on WordPress

Source: Internet
Author: User
Tags wordpress blog docker run

Docker builds LNMP website platform
1 Customizing the Network

[[email protected] ~]# docker network create lnmpecf3266e5d864f09d4a2e258797903d65a2818c7248ff2199f7592a90f3eb76c

2 Creating a MySQL database Container
[[email protected] ~]# docker run -itd --name lnmp_mysql --net lnmp -p 3306:3306 --mount src=mysql-vol,dst=/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 mysql --character-set-server=utf8

3 Creating the required database
docker exec lnmp_mysql sh -c ‘exec mysql -uroot -p"$MYSQL_ROOT_PASSWORD" -e"create database wp"‘

4 Creating a PHP environment container

docker run -itd --name lnmp_web --net lnmp -p 88:80 --mount type=bind,src=/app/wwwroot,dst=/var/www/html richarvey/nginx-php-fpm

5 Take WordPress Blog as an example test

wget https://cn.wordpress.org/wordpress-4.7.4-zh_CN.tar.gztar zxf wordpress-4.7.4-zh_CN.tar.gz -C /app/wwwroot

6 Browser Test Access
http://IP:88/wordpress

Docker build LNMP website platform based on WordPress

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.