Browse code

Begin process of deprecating MAINTAINER

This may take some time, but start by pointing people at
LABEL instead.

MAINTAINER predates general LABEL and has basically no tooling,
only allows a single item to be added, and is has been
unofficially deprecated for some time, with many images not
including it, but we have never specifically said that it
should be replaced by LABEL as a better more generic metadata
solution.

Signed-off-by: Justin Cormack <justin.cormack@docker.com>

Justin Cormack authored on 2016/08/06 21:34:49
Showing 4 changed files
... ...
@@ -1,6 +1,4 @@
1 1
 FROM docs/base:oss
2
-MAINTAINER Docker Docs <docs@docker.com>
3
-
4 2
 ENV PROJECT=engine
5 3
 # To get the git info for this repo
6 4
 COPY . /src
... ...
@@ -196,3 +196,7 @@ Since 1.9, Docker Content Trust Offline key has been renamed to Root key and the
196 196
 - DOCKER_CONTENT_TRUST_OFFLINE_PASSPHRASE is now named DOCKER_CONTENT_TRUST_ROOT_PASSPHRASE
197 197
 - DOCKER_CONTENT_TRUST_TAGGING_PASSPHRASE is now named DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE
198 198
 
199
+### `MAINTAINER` in Dockerfile
200
+**Deprecated In Release: v1.13.0**
201
+
202
+`MAINTAINER` was an early very limited form of `LABEL` which should be used instead.
... ...
@@ -486,13 +486,6 @@ before each new `FROM` command.
486 486
 assumes a `latest` by default. The builder returns an error if it cannot match
487 487
 the `tag` value.
488 488
 
489
-## MAINTAINER
490
-
491
-    MAINTAINER <name>
492
-
493
-The `MAINTAINER` instruction allows you to set the *Author* field of the
494
-generated images.
495
-
496 489
 ## RUN
497 490
 
498 491
 RUN has 2 forms:
... ...
@@ -687,6 +680,20 @@ To view an image's labels, use the `docker inspect` command.
687 687
         "other": "value3"
688 688
     },
689 689
 
690
+## MAINTAINER (deprecated)
691
+
692
+    MAINTAINER <name>
693
+
694
+The `MAINTAINER` instruction sets the *Author* field of the generated images. 
695
+The `LABEL` instruction is a much more flexible version of this and you should use
696
+it instead, as it enables setting any metadata you require, and can be viewed
697
+easily, for example with `docker inspect`. To set a label corresponding to the
698
+`MAINTAINER` field you could use:
699
+
700
+    LABEL maintainer "SvenDowideit@home.org.au"
701
+
702
+This will then be visible from `docker inspect` with the other labels.
703
+
690 704
 ## EXPOSE
691 705
 
692 706
     EXPOSE <port> [<port>...]
... ...
@@ -1676,8 +1683,6 @@ something more realistic, take a look at the list of [Dockerization examples](..
1676 1676
 # VERSION               0.0.1
1677 1677
 
1678 1678
 FROM      ubuntu
1679
-MAINTAINER Victor Vieux <victor@docker.com>
1680
-
1681 1679
 LABEL Description="This image is used to start the foobar executable" Vendor="ACME Products" Version="1.0"
1682 1680
 RUN apt-get update && apt-get install -y inotify-tools nginx apache2 openssh-server
1683 1681
 ```
... ...
@@ -265,7 +265,6 @@ building your own Sinatra image for your fictitious development team.
265 265
 
266 266
     # This is a comment
267 267
     FROM ubuntu:14.04
268
-    MAINTAINER Kate Smith <ksmith@example.com>
269 268
     RUN apt-get update && apt-get install -y ruby ruby-dev
270 269
     RUN gem install sinatra
271 270
 
... ...
@@ -277,7 +276,7 @@ is capitalized.
277 277
 > **Note:** You use `#` to indicate a comment
278 278
 
279 279
 The first instruction `FROM` tells Docker what the source of our image is, in
280
-this case you're basing our new image on an Ubuntu 14.04 image. The instruction uses the `MAINTAINER` instruction to specify who maintains the new image.
280
+this case you're basing our new image on an Ubuntu 14.04 image.
281 281
 
282 282
 Lastly, you've specified two `RUN` instructions. A `RUN` instruction executes
283 283
 a command inside the image, for example installing a package. Here you're
... ...
@@ -294,10 +293,7 @@ Now let's take our `Dockerfile` and use the `docker build` command to build an i
294 294
     Sending build context to Docker daemon
295 295
     Step 1 : FROM ubuntu:14.04
296 296
      ---> e54ca5efa2e9
297
-    Step 2 : MAINTAINER Kate Smith <ksmith@example.com>
298
-     ---> Using cache
299
-     ---> 851baf55332b
300
-    Step 3 : RUN apt-get update && apt-get install -y ruby ruby-dev
297
+    Step 2 : RUN apt-get update && apt-get install -y ruby ruby-dev
301 298
      ---> Running in 3a2558904e9b
302 299
     Selecting previously unselected package libasan0:amd64.
303 300
     (Reading database ... 11518 files and directories currently installed.)
... ...
@@ -432,7 +428,7 @@ Now let's take our `Dockerfile` and use the `docker build` command to build an i
432 432
     Running hooks in /etc/ca-certificates/update.d....done.
433 433
      ---> c55c31703134
434 434
     Removing intermediate container 3a2558904e9b
435
-    Step 4 : RUN gem install sinatra
435
+    Step 3 : RUN gem install sinatra
436 436
      ---> Running in 6b81cb6313e5
437 437
     unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping
438 438
     unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping