Commit Graph

76 Commits

Author SHA1 Message Date
14004cb76b Add support for more advanced ${xxx:...} syntax
Just ${xxx:+...} and ${xxx:-...} for now

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: efc478e33c
Component: cli
2017-06-02 00:06:52 +00:00
03dc80863d document dirperm1 fix for #783 in known issues
Since `dirperm1` requires a more recent aufs patch than many current OS release,
we cant remove #783 completely. This documents that docker will apply `dirperm1`
automatically for systems that support it

Signed-off-by: Daniel, Dao Quang Minh <dqminh89@gmail.com>
Upstream-commit: 729035faff
Component: cli
2017-06-02 00:06:52 +00:00
4fa12af301 Removing sudo from command line examples
We now advise people to configure docker group and
add to sudo.  Mac shouldn't use sudo.  Removed sudo
from command examples.  Left in installation to be removed
in installation doc sweep -- removing requires finer
grain control.

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: fb7eb87b94
Component: cli
2017-06-02 00:06:52 +00:00
39d8bc547c Fix some escaping around env var processing
Clarify in the docs that ENV is not recursive

Closes #10391

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: f32b6eb23c
Component: cli
2017-06-02 00:06:51 +00:00
ff8aabb69e Updating with Sven's comments and other tweaks
Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: ade615a458
Component: cli
2017-06-02 00:06:50 +00:00
409acea418 Add ability to refer to image by name + digest
Add ability to refer to an image by repository name and digest using the
format repository@digest. Works for pull, push, run, build, and rmi.

Signed-off-by: Andy Goldstein <agoldste@redhat.com>
Upstream-commit: 2eaa831df5
Component: cli
2017-06-02 00:06:50 +00:00
3320d5612e Documentation changes for labels
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: bfca1f4258
Component: cli
2017-06-02 00:06:50 +00:00
1b8ddaebbc Add labels documentation
Adds more documentation for labels and adds the label instruction to the
man-pages.

Also included is a document called "Labels - custom meta-data in Docker"
in the user-guide, this is still a work-in-progress I started to describe
the "namespaces" conventions, an example on storing structured data.

I ran a bit "out of steam" (writers block?) on that document, but kept
it in (for now), in case it still ends up useful.

The Remote API documentation changes will need to be moved to the
docker_remote_api_v1.18.md document when rebasing the whole PR.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Signed-off-by: Darren Shepherd <darren@rancher.com>
Upstream-commit: b5c9f3f13a
Component: cli
2017-06-02 00:06:50 +00:00
bb1e827ed6 Allow specification of Label Name/Value pairs in image json content
Save "LABEL" field in Dockerfile into image content.

This will allow a user to save user data into an image, which
can later be retrieved using:

docker inspect IMAGEID

I have copied this from the "Comment" handling in docker images.

We want to be able to add Name/Value data to an image to describe the image,
and then be able to use other tools to look at this data, to be able to do
security checks based on this data.

We are thinking about adding version names,
Perhaps listing the content of the dockerfile.
Descriptions of where the code came from etc.

This LABEL field should also be allowed to be specified in the
docker import --change LABEL:Name=Value
docker commit --change LABEL:Name=Value

Docker-DCO-1.1-Signed-off-by: Dan Walsh <dwalsh@redhat.com> (github: rhatdan)
Upstream-commit: 72b8275268
Component: cli
2017-06-02 00:06:50 +00:00
d6cbeaf542 Tell users about how VOLUME initializes the new mount point/volume
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: d69dea3c44
Component: cli
2017-06-02 00:06:48 +00:00
ba91e1ac06 Notes should be indented
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 8ac0e4d95e
Component: cli
2017-06-02 00:06:48 +00:00
1b5e543305 a little re-writing
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 10560b0a8f
Component: cli
2017-06-02 00:06:47 +00:00
f0885a3ea4 Distinguish ENV from setting environment inline
It's ambiguous to say that `ENV` is _functionally equivalent to prefixing the command with `<key>=<value>`_. `ENV` sets the environment for all future commands, but `RUN` can take chained commands like `RUN foo=bar bash -c 'echo $foo' && bash -c 'echo $foo $bar'`. Users with a solid understanding of `exec` may grok this without confusion, but less experienced users may need this distinction.

Signed-off-by: Michael A. Smith <msmith3@ebay.com>

Improve Environment Handling Descriptions

- Link `ENV` and `Environment Replacement`
- Improve side-effects of `ENV` text
- Rearrange avoiding side effects text

Signed-off-by: Michael A. Smith <msmith3@ebay.com>
Upstream-commit: 95fe3a1a93
Component: cli
2017-06-02 00:06:46 +00:00
5d0802d112 Fix docs so WORKDIR mentions it works for COPY and ADD too
The docs around COPY/ADD already mentioned that it will do a relative
copy/add based on WORKDIR, so that part is already ok.  Just needed to
tweak the WORKDIR section since w/o mentioning COPY/ADD it can be misleading.

Noticed by @phemmer

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 37fd964edb
Component: cli
2017-06-02 00:06:46 +00:00
88a2eb4a22 Support whitespaces in ADD and COPY continued
Add tests and documentation for this new feature.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 776f4e478e
Component: cli
2017-06-02 00:06:45 +00:00
c0e17b6f88 Specify ENV variables are also used for CMD.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: fbe252581a
Component: cli
2017-06-02 00:06:44 +00:00
d5c66b30ea Have .dockerignore support Dockerfile/.dockerignore
If .dockerignore mentions either then the client will send them to the
daemon but the daemon will erase them after the Dockerfile has been parsed
to simulate them never being sent in the first place.

an events test kept failing for me so I tried to fix that too

Closes #8330

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: c88762b38b
Component: cli
2017-06-02 00:06:44 +00:00
f021a10a56 Allow for relative paths on ADD/COPY
Moved Tianon's PR from: https://github.com/docker/docker/pull/7870
on top of the latest code

Closes: #3936

Signed-off-by: Andrew Page <admwiggin@gmail.com>
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: c5bc505744
Component: cli
2017-06-02 00:06:43 +00:00
b39e021d90 add Scott's link checker script, and fix what it finds
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 1cc7a4eb81
Component: cli
2017-06-02 00:06:43 +00:00
10e21c9024 Fix dead link build.md
Upstream-commit: 5d4d002c23
Component: cli
2017-06-02 00:06:42 +00:00
9fe52b1bc3 Update documentation for EXPOSE
The documentation for EXPOSE seems to indicate, that EXPOSE is only relevant in
the context of links, which is not the case.

Signed-off-by: Jacob Atzen <jatzen@gmail.com>
Upstream-commit: d40014d096
Component: cli
2017-06-02 00:06:42 +00:00
53c6a1a222 Fix a small typo
Signed-off-by: Michael Steinert <mike.steinert@gmail.com>
Upstream-commit: ab60926400
Component: cli
2017-06-02 00:06:42 +00:00
95803a3f8e Add an example that shows starting apache in the foreground
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 440a18bb50
Component: cli
2017-06-02 00:06:41 +00:00
1c7bca9662 Add support for ENV of the form: ENV name=value ...
still supports the old form: ENV name value

Also, fixed an issue with the parser where it would ignore lines
at the end of the Dockerfile that ended with \

Closes #2333

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 489d01ee7d
Component: cli
2017-06-02 00:06:41 +00:00
f70d2bcde7 Be clearer in docs about COPY/ADD dirs
COPY/ADD just copies the contents of dirs, not dirs themselves.
This PR tries to clear that up in the docs.

Closes #8775

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: da3b6648fd
Component: cli
2017-06-02 00:06:41 +00:00
50d98e557e Updated the COPY directive reference: Source can't be a URL for COPY (+ formatting error fixes)
Signed-off-by: Roman Dudin <katrmr@gmail.com>
Upstream-commit: 2c1368cd2f
Component: cli
2017-06-02 00:06:39 +00:00
7beca7812a Use the HTTP Last-Modified http header as the mtime value for ADD cmd when present
Closes #8331

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 0d41e6a758
Component: cli
2017-06-02 00:06:39 +00:00
e381bb96ca Fix apparent copy paste mistake
The note under the RUN header refers to the CMD instruction. It should refer to the RUN instruction instead.

Signed-off-by: Huu Nguyen <whoshuu@gmail.com>
Upstream-commit: 86e72c6e06
Component: cli
2017-06-02 00:06:39 +00:00
2c48eb8298 Clarify USER instruction documentation
Reuse WORKDIR wording to specify that the USER instructions affect the
following RUN, CMD, and ENTRYPOINT instructions.

Signed-off-by: Arnaud Porterie <arnaud.porterie@docker.com>
Upstream-commit: 7caa149d5f
Component: cli
2017-06-02 00:06:39 +00:00
31abb69581 Tweaks to Dockerfile tutorial
Made a few tweaks to Dockerfile tutorial links and removed some cruft from the tutorial itself.

Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
Upstream-commit: a6ba3f585b
Component: cli
2017-06-02 00:06:37 +00:00
ab2803a8e5 builder: Update documentation WRT environment replacement
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 15192a0bc1
Component: cli
2017-06-02 00:06:37 +00:00
e55b45b1a6 Rewrite ENTRYPOINT documentation covering all the combinations with examples.
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: 9efb51fbc1
Component: cli
2017-06-02 00:06:37 +00:00
6b65799e84 Fixed a minor docs issue in a Dockerfile Example
The Dockerfile Instruction to create the .vnc directory results in a failure :
-storepasswd failed for file: /root/.vnc/passwd

Signed-off-by: Madhu Venugopal <madhu@socketplane.io>
Upstream-commit: a6594e13ce
Component: cli
2017-06-02 00:06:37 +00:00
dc688c1670 Add ENV variables support to WORKDIR build command
Docker-DCO-1.1-Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com> (github: unclejack)
Docker-DCO-1.1-Signed-off-by: Adrien Folie <folie.adrien@gmail.com> (github: folieadrien)

Conflicts:
	builder/builder.go
		This file has been deleted.
Upstream-commit: 410719e6df
Component: cli
2017-06-02 00:06:36 +00:00
7f828fa717 Add note to docs about lack of shell processing in JSON form
Closes #5509

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 49323dfac9
Component: cli
2017-06-02 00:06:36 +00:00
08787f1ac5 Doc update to clarify EXPOSE vs -p functionality.
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
Upstream-commit: 1d2bb271ac
Component: cli
2017-06-02 00:06:35 +00:00
28be9d5897 Add more info about when build cache is invalidated/used - Issue #3636
Plus some edits as suggested by @jamtur01

Closes #3636

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 0e82ab713b
Component: cli
2017-06-02 00:06:35 +00:00
da4bfdb14a add wildcard support to copy/add
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 1a83c9f87e
Component: cli
2017-06-02 00:06:35 +00:00
ce71b7d929 builder: Fix handling of VOLUME command where multiple volumes are
specified in a space delimited list.

Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: 82ff6f0c9f
Component: cli
2017-06-02 00:06:35 +00:00
dcdc597a18 Adding new Dockerfile Best Practices doc, and links thereto.
Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
Upstream-commit: 85808d776d
Component: cli
2017-06-02 00:06:35 +00:00
17eed5a7b8 Add support for copy/add with multiple src files
Part one of solution for issue #6820

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 6ea2cc5e0e
Component: cli
2017-06-02 00:06:34 +00:00
c6cd0c88d2 Consistently use 'sudo docker' in examples
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: 3ca630d381
Component: cli
2017-06-02 00:06:34 +00:00
632772241e Add notes about single-quotes
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: f0b5f2601f
Component: cli
2017-06-02 00:06:34 +00:00
33b2b9f6b8 Fixed a typo and added a bit based on Sven's feedback
Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
Upstream-commit: e06e910b87
Component: cli
2017-06-02 00:06:33 +00:00
6fe3a11825 Added warning re: using root for dockerfile root. Fixes #7612
Docker-DCO-1.1-Signed-off-by: Fred Lifton <fred.lifton@docker.com> (github: fredlf)
Upstream-commit: f30add12fe
Component: cli
2017-06-02 00:06:33 +00:00
5e62cf124c fix for issue 7281
add missing comma per O.S. Tezer's commment

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: d31f289d22
Component: cli
2017-06-02 00:06:32 +00:00
14d1356fcf Make it clear that JSON array format should be used if CMD is used as default arguments
Signed-off-by: Xuecong Liao <satorulogic@gmail.com>
Upstream-commit: e778875858
Component: cli
2017-06-02 00:06:32 +00:00
0ddf7346b7 Fix example of relative WORKDIR
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 83b89cd5cd
Component: cli
2017-06-02 00:06:32 +00:00
cc9ecd5a3b Standardize "apt-get install" usage across the repo
I might have missed some, but I think this is most of the offenders.

Docker-DCO-1.1-Signed-off-by: Andrew Page <admwiggin@gmail.com> (github: tianon)
Upstream-commit: cc74364de9
Component: cli
2017-06-02 00:06:32 +00:00
7d18ebcbe5 Fix incorrect path in ENTRYPOINT example
The ENTRYPOINT example uses "/usr/bin/ls" as path, but `ls` is located at `/bin/ls`.

Docker-DCO-1.1-Signed-off-by: Sebastiaan van Stijn <github@gone.nl> (github: thaJeztah)
Upstream-commit: c290eb9a8c
Component: cli
2017-06-02 00:06:32 +00:00