Przeglądaj źródła

Merge pull request #25466 from justincormack/deprecate-maintainer

Begin process of deprecating MAINTAINER
Sebastiaan van Stijn 9 lat temu
rodzic
commit
4d187df277
4 zmienionych plików z 21 dodań i 18 usunięć
  1. 0 2
      docs/Dockerfile
  2. 4 0
      docs/deprecated.md
  3. 14 9
      docs/reference/builder.md
  4. 3 7
      docs/tutorials/dockerimages.md

+ 0 - 2
docs/Dockerfile

@@ -1,6 +1,4 @@
 FROM docs/base:oss
-MAINTAINER Docker Docs <docs@docker.com>
-
 ENV PROJECT=engine
 # To get the git info for this repo
 COPY . /src

+ 4 - 0
docs/deprecated.md

@@ -196,3 +196,7 @@ Since 1.9, Docker Content Trust Offline key has been renamed to Root key and the
 - DOCKER_CONTENT_TRUST_OFFLINE_PASSPHRASE is now named DOCKER_CONTENT_TRUST_ROOT_PASSPHRASE
 - DOCKER_CONTENT_TRUST_TAGGING_PASSPHRASE is now named DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE
 
+### `MAINTAINER` in Dockerfile
+**Deprecated In Release: v1.13.0**
+
+`MAINTAINER` was an early very limited form of `LABEL` which should be used instead.

+ 14 - 9
docs/reference/builder.md

@@ -486,13 +486,6 @@ before each new `FROM` command.
 assumes a `latest` by default. The builder returns an error if it cannot match
 the `tag` value.
 
-## MAINTAINER
-
-    MAINTAINER <name>
-
-The `MAINTAINER` instruction allows you to set the *Author* field of the
-generated images.
-
 ## RUN
 
 RUN has 2 forms:
@@ -687,6 +680,20 @@ To view an image's labels, use the `docker inspect` command.
         "other": "value3"
     },
 
+## MAINTAINER (deprecated)
+
+    MAINTAINER <name>
+
+The `MAINTAINER` instruction sets the *Author* field of the generated images. 
+The `LABEL` instruction is a much more flexible version of this and you should use
+it instead, as it enables setting any metadata you require, and can be viewed
+easily, for example with `docker inspect`. To set a label corresponding to the
+`MAINTAINER` field you could use:
+
+    LABEL maintainer "SvenDowideit@home.org.au"
+
+This will then be visible from `docker inspect` with the other labels.
+
 ## EXPOSE
 
     EXPOSE <port> [<port>...]
@@ -1676,8 +1683,6 @@ something more realistic, take a look at the list of [Dockerization examples](..
 # VERSION               0.0.1
 
 FROM      ubuntu
-MAINTAINER Victor Vieux <victor@docker.com>
-
 LABEL Description="This image is used to start the foobar executable" Vendor="ACME Products" Version="1.0"
 RUN apt-get update && apt-get install -y inotify-tools nginx apache2 openssh-server
 ```

+ 3 - 7
docs/tutorials/dockerimages.md

@@ -264,7 +264,6 @@ building your own Sinatra image for your fictitious development team.
 
     # This is a comment
     FROM ubuntu:14.04
-    MAINTAINER Kate Smith <ksmith@example.com>
     RUN apt-get update && apt-get install -y ruby ruby-dev
     RUN gem install sinatra
 
@@ -276,7 +275,7 @@ is capitalized.
 > **Note:** You use `#` to indicate a comment
 
 The first instruction `FROM` tells Docker what the source of our image is, in
-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.
+this case you're basing our new image on an Ubuntu 14.04 image.
 
 Lastly, you've specified two `RUN` instructions. A `RUN` instruction executes
 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
     Sending build context to Docker daemon
     Step 1 : FROM ubuntu:14.04
      ---> e54ca5efa2e9
-    Step 2 : MAINTAINER Kate Smith <ksmith@example.com>
-     ---> Using cache
-     ---> 851baf55332b
-    Step 3 : RUN apt-get update && apt-get install -y ruby ruby-dev
+    Step 2 : RUN apt-get update && apt-get install -y ruby ruby-dev
      ---> Running in 3a2558904e9b
     Selecting previously unselected package libasan0:amd64.
     (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
     Running hooks in /etc/ca-certificates/update.d....done.
      ---> c55c31703134
     Removing intermediate container 3a2558904e9b
-    Step 4 : RUN gem install sinatra
+    Step 3 : RUN gem install sinatra
      ---> Running in 6b81cb6313e5
     unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping
     unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping