Bug 1252097 - Some minor tweaks to "man Dockerfile".
Some minor tweaks to "man Dockerfile".
Product: Fedora
Classification: Fedora
Component: docker (Show other bugs)
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Sally
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2015-08-10 13:21 EDT by Robert P. J. Day
Modified: 2016-02-16 14:57 EST (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-02-16 14:57:57 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Robert P. J. Day 2015-08-10 13:21:29 EDT
* Format of FROM instruction: In addition to the two variations shown in the man page, I understand there is also a "image@digest" form.

* Minor nit -- might be useful to add that MAINTAINER can also take a general URL that represents the owner of the Dockerfile, like http://fedoraproject.org/wiki/Cloud

* "There can be only one CMD in a Dockerfile." Well, no, there *can* be more than one but, as you point out in the next line, only the last one counts. I would reword that as, "There should be only one CMD in a Dockerfile."

* Apparently, the LABEL instruction can also accept a space instead of an equal sign -- that's not mentioned in the man page.

* Under "ENV", "RUN" is not in bold as are "ENTRYPOINT" and "CMD".

* Under "ADD", I don't see any mention that it can handle tarballs.

  I think that's it.
Comment 1 Robert P. J. Day 2015-08-21 07:45:58 EDT
  Couple more observations on "man Dockerfile", even though I think that entire page could be rewritten.

  First, there is no mention that both COPY and ADD can take archive-type arguments (tar, gzip, bzip2); *however*, I just learned that such archive files will be automatically unpacked only if they're local -- archives copied via URL will NOT be automatically unpacked. (Side note: https://labs.ctl.io/dockerfile-add-vs-copy/ is a decent blog post basically saying don't use ADD at all, and it makes a compelling argument.)

  Also, it might be worth mentioning that LABEL is useful not only for adding arbitrary metadata to an image, but in the context of atomic hosts as explained here:


But that's a judgment call.
Comment 2 Daniel Walsh 2015-08-23 06:11:01 EDT
I think adding the information on ADD/COPY would be appropriate.  Adding information on LABEL, might be controversial, since we use it for tooling but not in docker in general.  Might be able to list some potential use cases of LABEL though.
Comment 3 Sally 2015-09-03 07:26:32 EDT
submitted https://github.com/docker/docker/pull/16043
Comment 4 Robert P. J. Day 2015-09-03 07:28:56 EDT
Seems to be a missing ] here:

LABEL [<key>[ <value>]
Comment 6 Sally 2015-09-05 08:33:05 EDT
merged https://github.com/docker/docker/pull/16043 (and fixed errant [) :)
Comment 7 Daniel Walsh 2015-09-06 06:53:15 EDT
Fixed in docker-1.9

Note You need to log in before you can comment on or make changes to this bug.