Skip to content

Commit efb9e38

Browse files
committed
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 <[email protected]>
1 parent 46cb1f2 commit efb9e38

4 files changed

Lines changed: 21 additions & 18 deletions

File tree

docs/Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
FROM docs/base:oss
2-
MAINTAINER Docker Docs <[email protected]>
3-
42
ENV PROJECT=engine
53
# To get the git info for this repo
64
COPY . /src

docs/deprecated.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,3 +196,7 @@ Since 1.9, Docker Content Trust Offline key has been renamed to Root key and the
196196
- DOCKER_CONTENT_TRUST_OFFLINE_PASSPHRASE is now named DOCKER_CONTENT_TRUST_ROOT_PASSPHRASE
197197
- DOCKER_CONTENT_TRUST_TAGGING_PASSPHRASE is now named DOCKER_CONTENT_TRUST_REPOSITORY_PASSPHRASE
198198

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.

docs/reference/builder.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -486,13 +486,6 @@ before each new `FROM` command.
486486
assumes a `latest` by default. The builder returns an error if it cannot match
487487
the `tag` value.
488488

489-
## MAINTAINER
490-
491-
MAINTAINER <name>
492-
493-
The `MAINTAINER` instruction allows you to set the *Author* field of the
494-
generated images.
495-
496489
## RUN
497490

498491
RUN has 2 forms:
@@ -687,6 +680,20 @@ To view an image's labels, use the `docker inspect` command.
687680
"other": "value3"
688681
},
689682

683+
## MAINTAINER (deprecated)
684+
685+
MAINTAINER <name>
686+
687+
The `MAINTAINER` instruction sets the *Author* field of the generated images.
688+
The `LABEL` instruction is a much more flexible version of this and you should use
689+
it instead, as it enables setting any metadata you require, and can be viewed
690+
easily, for example with `docker inspect`. To set a label corresponding to the
691+
`MAINTAINER` field you could use:
692+
693+
LABEL maintainer "[email protected]"
694+
695+
This will then be visible from `docker inspect` with the other labels.
696+
690697
## EXPOSE
691698

692699
EXPOSE <port> [<port>...]
@@ -1676,8 +1683,6 @@ something more realistic, take a look at the list of [Dockerization examples](..
16761683
# VERSION 0.0.1
16771684
16781685
FROM ubuntu
1679-
MAINTAINER Victor Vieux <[email protected]>
1680-
16811686
LABEL Description="This image is used to start the foobar executable" Vendor="ACME Products" Version="1.0"
16821687
RUN apt-get update && apt-get install -y inotify-tools nginx apache2 openssh-server
16831688
```

docs/tutorials/dockerimages.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,6 @@ building your own Sinatra image for your fictitious development team.
265265

266266
# This is a comment
267267
FROM ubuntu:14.04
268-
MAINTAINER Kate Smith <[email protected]>
269268
RUN apt-get update && apt-get install -y ruby ruby-dev
270269
RUN gem install sinatra
271270

@@ -277,7 +276,7 @@ is capitalized.
277276
> **Note:** You use `#` to indicate a comment
278277
279278
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.
279+
this case you're basing our new image on an Ubuntu 14.04 image.
281280

282281
Lastly, you've specified two `RUN` instructions. A `RUN` instruction executes
283282
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
294293
Sending build context to Docker daemon
295294
Step 1 : FROM ubuntu:14.04
296295
---> e54ca5efa2e9
297-
Step 2 : MAINTAINER Kate Smith <[email protected]>
298-
---> Using cache
299-
---> 851baf55332b
300-
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
301297
---> Running in 3a2558904e9b
302298
Selecting previously unselected package libasan0:amd64.
303299
(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
432428
Running hooks in /etc/ca-certificates/update.d....done.
433429
---> c55c31703134
434430
Removing intermediate container 3a2558904e9b
435-
Step 4 : RUN gem install sinatra
431+
Step 3 : RUN gem install sinatra
436432
---> Running in 6b81cb6313e5
437433
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping
438434
unable to convert "\xC3" to UTF-8 in conversion from ASCII-8BIT to UTF-8 to US-ASCII for README.rdoc, skipping

0 commit comments

Comments
 (0)