Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
19
Help us understand the problem. What is going on with this article?
@okisanjp

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

More than 3 years have passed since last update.

こちらによると、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>",
19
Help us understand the problem. What is going on with this article?
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away

Comments

No comments
Sign up for free and join this conversation.
Sign Up
If you already have a Qiita account Login
19
Help us understand the problem. What is going on with this article?