Remove blank lines after code block markers

This commit is contained in:
yeasy
2026-03-21 22:36:09 -07:00
parent 312f8fea42
commit 9ac19d79ee
132 changed files with 0 additions and 1517 deletions

View File

@@ -13,27 +13,23 @@
```bash
$ docker run --name some-nginx -v /some/content:/usr/share/nginx/html:ro -d nginx
```
用户也可以不使用这种映射方式通过利用 Dockerfile 来直接将静态页面内容放到镜像中内容为
```docker
FROM nginx
COPY static-html-directory /usr/share/nginx/html
```
之后生成新的镜像并启动一个容器
```bash
$ docker build -t some-content-nginx .
$ docker run --name some-nginx -d some-content-nginx
```
开放端口并映射到本地的 `8080` 端口
```bash
$ docker run --name some-nginx -d -p 8080:80 some-content-nginx
```
Nginx 的默认配置文件路径为 `/etc/nginx/nginx.conf`可以通过映射它来使用本地的配置文件例如
```bash
@@ -43,7 +39,6 @@ $ docker run -d \
-v /path/nginx.conf:/etc/nginx/nginx.conf:ro \
nginx
```
### Dockerfile
请到 [Nginx 官方镜像文档目录](https://github.com/docker-library/docs/tree/master/nginx) 查看。