#6 修改作业3运行命令,未标明环境变量

Sapludināts
陆雪松 sapludināja 1 revīzijas no 10205501411/cloud-computing-course:master uz master pirms 1 gada
  1. +1
    -1
      Assignment4.md

+ 1
- 1
Assignment4.md Parādīt failu

@ -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是镜像名。

Notiek ielāde…
Atcelt
Saglabāt