Browse code

Merge pull request #25466 from justincormack/deprecate-maintainer

Begin process of deprecating MAINTAINER

Sebastiaan van Stijn authored on 2016/09/13 19:07:04
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
 ```
... ...
@@ -264,7 +264,6 @@ building your own Sinatra image for your fictitious development team.
264 264
 
265 265
     # This is a comment
266 266
     FROM ubuntu:14.04
267
-    MAINTAINER Kate Smith <ksmith@example.com>
268 267
     RUN apt-get update && apt-get install -y ruby ruby-dev
269 268
     RUN gem install sinatra
270 269
 
... ...
@@ -276,7 +275,7 @@ is capitalized.
276 276
 > **Note:** You use `#` to indicate a comment
277 277
 
278 278
 The first instruction `FROM` tells Docker what the source of our image is, in
279
-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.
279
+this case you're basing our new image on an Ubuntu 14.04 image.
280 280
 
281 281
 Lastly, you've specified two `RUN` instructions. A `RUN` instruction executes
282 282
 a command inside the image, for example installing a package. Here you're
... ...
@@ -293,10 +292,7 @@ Now let's take our `Dockerfile` and use the `docker build` command to build an i
293 293
     Sending build context to Docker daemon
294 294
     Step 1 : FROM ubuntu:14.04
295 295
      ---> e54ca5efa2e9
296
-    Step 2 : MAINTAINER Kate Smith <ksmith@example.com>
297
-     ---> Using cache
298
-     ---> 851baf55332b
299
-    Step 3 : RUN apt-get update && apt-get install -y ruby ruby-dev
296
+    Step 2 : RUN apt-get update && apt-get install -y ruby ruby-dev
300 297
      ---> Running in 3a2558904e9b
301 298
     Selecting previously unselected package libasan0:amd64.
302 299
     (Reading database ... 11518 files and directories currently installed.)
... ...
@@ -431,7 +427,7 @@ Now let's take our `Dockerfile` and use the `docker build` command to build an i
431 431
     Running hooks in /etc/ca-certificates/update.d....done.
432 432
      ---> c55c31703134
433 433
     Removing intermediate container 3a2558904e9b
434
-    Step 4 : RUN gem install sinatra
434
+    Step 3 : RUN gem install sinatra
435 435
      ---> Running in 6b81cb6313e5
436 436
     unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping
437 437
     unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping