Ver a proveniência

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

master
Bruce-Jay há 1 ano
ascendente
cometimento
81e04859c0
1 ficheiros alterados com 1 adições e 1 eliminações
  1. +1
    -1
      Assignment4.md

+ 1
- 1
Assignment4.md Ver ficheiro

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

Carregando…
Cancelar
Guardar