mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-08-10 16:37:34 +00:00
Add blank lines before headers
This commit is contained in:
@@ -73,6 +73,7 @@ LABEL org.opencontainers.image.authors="yeasy" \
|
||||
旧版本的 Dockerfile 中常看到 `MAINTAINER` 指令:
|
||||
|
||||
```docker
|
||||
|
||||
## ❌ 已弃用
|
||||
|
||||
MAINTAINER user@example.com
|
||||
@@ -81,9 +82,11 @@ MAINTAINER user@example.com
|
||||
现在推荐使用 `LABEL`:
|
||||
|
||||
```docker
|
||||
|
||||
## ✅ 推荐
|
||||
|
||||
LABEL maintainer="user@example.com"
|
||||
|
||||
## 或
|
||||
|
||||
LABEL org.opencontainers.image.authors="user@example.com"
|
||||
@@ -132,6 +135,7 @@ $ docker inspect nginx --format '{{json .Config.Labels}}' | jq
|
||||
可以使用标签过滤镜像:
|
||||
|
||||
```bash
|
||||
|
||||
## 列出作者是 yeasy 的所有镜像
|
||||
|
||||
$ docker images --filter "label=org.opencontainers.image.authors=yeasy"
|
||||
|
||||
Reference in New Issue
Block a user