mirror of
https://github.com/yeasy/docker_practice.git
synced 2025-08-07 07:42:10 +00:00
Dockerfile add shell label
Signed-off-by: Kang Huaishuai <khs1994@khs1994.com>
This commit is contained in:
17
image/dockerfile/label.md
Normal file
17
image/dockerfile/label.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# 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
|
Reference in New Issue
Block a user