From 81e04859c0b7f8b0a11365e42952b19ee2742f61 Mon Sep 17 00:00:00 2001 From: Bruce-Jay Date: Sat, 14 Oct 2023 21:09:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BD=9C=E4=B8=9A3=E8=BF=90?= =?UTF-8?q?=E8=A1=8C=E5=91=BD=E4=BB=A4=EF=BC=8C=E6=9C=AA=E6=A0=87=E6=98=8E?= =?UTF-8?q?=E7=8E=AF=E5=A2=83=E5=8F=98=E9=87=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assignment4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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是镜像名。