Docker build WordPress

docker pull mysql:5.6.44
docker pull wordpress

docker run -d --name wp-mysql -e MYSQL_ROOT_PASSWORD=123456 -p 3306:3306 mysql:5.6.44
docker run -d --name wp --link wp-mysql:mysql -p 80:80 wordpress

docker ps
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES
ce971d9ae8a3        wordpress           "docker-entrypoint.s…"   2 minutes ago       Up 2 minutes        0.0.0.0:80->80/tcp       wp
b0759a75775d        mysql:5.6.44        "docker-entrypoint.s…"   4 minutes ago       Up 4 minutes        0.0.0.0:3306->3306/tcp   wp-mysql

Performing these operations can go to your browser test verifies
http://192.168.75.145
as shown below
, I have installed the way to write an essay.
In short docker build personal blog is very simple, right when the exercise command docker, understanding docker container, laughed laughed!
Note: The figure has been modified. Profile inside the upper right corner directly enter a new password, update profile, like



Guess you like

Origin www.cnblogs.com/liuwei-xd/p/11109311.html