diff --git a/Assignment4.md b/Assignment4.md index 6d4d44b..8a5ba81 100644 --- a/Assignment4.md +++ b/Assignment4.md @@ -203,7 +203,7 @@ sudo docker pull cloud_computing/wordpress #### 2)运行wordpress的docker镜像,并将container的80和433端口暴露给云主机 ``` -sudo docker run --rm -d -p 80:80 -p 443:443 --name myWordpress -e WORDPRESS_DB_HOST=10.23.243.194:3306 -e WORDPRESS_DB_USER=root -e WORDPRESS_DB_PASSWORD=mysql123 WORDPRESS_DB_NAME=mysql wordpress +sudo docker run --rm -d -p 80:80 -p 443:443 --name myWordpress -e WORDPRESS_DB_HOST=10.23.243.194:3306 -e WORDPRESS_DB_USER=root -e WORDPRESS_DB_PASSWORD=mysql123 -e WORDPRESS_DB_NAME=mysql wordpress ``` > 回顾docker run语法,--rm container停止运行时自动删除,-d 以Detached模式运行container,-p 80:80 将container的80端口映射到云主机的80端口,--name为container取名(myWordpress),最后一个wordpress是镜像名。