docker_practice/image/dockerfile/label.md
Kang Huaishuai cbaa24c48f
Dockerfile add shell label
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
2020-09-06 20:16:04 +08:00

18 lines
477 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# LABEL 指令
`LABEL` 指令用来给镜像以键值对的形式添加一些元数据metadata
```docker
LABEL <key>=<value> <key>=<value> <key>=<value> ...
```
我们还可以用一些标签来申明镜像的作者文档地址等
```docker
LABEL org.opencontainers.image.authors="yeasy"
LABEL org.opencontainers.image.documentation="https://yeasy.gitbooks.io"
```
具体可以参考 https://github.com/opencontainers/image-spec/blob/master/annotations.md