37
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

1.13以降はMAINTAINERの代わりにLABELを使うようにしよう

Posted at

こちらによると、Docker 1.13からMAINTAINERの使用が非推奨(deprecated)となったようです。

互換性は保たれるとのことで、従来のDockerfileが動かなくなるということは無いですが
今後新規に作成するDockerfileでは対応しておいたほうが良さそうです。

MAINTAINERを廃止してLABELを使う

MAINTAINERの代わりにLABELを活用してくれということなのでLABELに書き換えてみました。

λ git diff 4ba573f .
diff --git a/Dockerfile b/Dockerfile
index c0d1185..3e9284c 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,5 +1,5 @@
 FROM centos:7
-MAINTAINER okisanjp
+LABEL  maintainer "okisanjp <okisan.jp@gmail.com>"

 # yum update
 RUN yum -y update && yum clean all

ちなみに、LABELを使用するとdocker inspectでmaintainerを確認したり出来ます

λ docker inspect centos7 | grep "maintainer"
                "maintainer": "okisanjp <okisan.jp@gmail.com>",
37
18
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
37
18

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?