Skip to content

Commit

Permalink
doc: update docker.md (#313)
Browse files Browse the repository at this point in the history
* add bash debug info

* Add some additional notes
  • Loading branch information
chaos-cn committed Feb 26, 2023
1 parent fcf60fb commit 32af22a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions docs/docker.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ $ docker run -d -p 80:80 docker/getting-started

----

- `-d` - 以分离模式运行容器
- `-p 80:80` - 将端口 80 映射到容器中的端口 80
- `-d` - 以分离(后台)模式运行容器
- `-p 80:80` - 将端口 80 映射到容器中的端口 80,格式:宿主机端口:容器端口
- `docker/getting-started` - 要使用的镜像

在前台创建并运行容器
在前台创建并运行容器(之后如果要退出容器但是不关闭容器,按*Ctrl+P+Q*即可)

```shell
$ docker run -it -p --rm 8001:8080 --name my-nginx nginx
Expand Down Expand Up @@ -149,6 +149,7 @@ Docker 镜像
### 构建镜像

```shell
# 注意有的最后面是英文 .
$ docker build .
$ docker build github.com/creack/docker-firefox
$ docker build - < Dockerfile
Expand Down

0 comments on commit 32af22a

Please sign in to comment.