首页>文档中心_帮助文档>Docker 教程(图文讲解)>Dockerfile LABEL 为镜像添加元数据

Dockerfile LABEL 为镜像添加元数据

LABEL 指令用于给镜像添加一些元数据 (metadata), 数据为键值对的形式,格式如下:

LABEL <key>=<value> <key>=<value> <key>=<value> ...

比如声明镜像的作者、文档地址等:

LABEL org.opencontainers.image.authors="quanxiaoha"

LABEL org.opencontainers.image.documentation="https://www.quanxiaoha.com"
搜索