Commit Graph

80 Commits

Author SHA1 Message Date
ed0cd8ff3b 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: 9f6e7e9aed85464651745090692317b30e4a3526
Component: engine
2015-02-02 14:55:25 -05:00
a4bc7ec4fb 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: f709da192cda47c9aaaa212b03442d4f28afdb97
Component: engine
2015-01-26 17:13:44 -08:00
1a5071a250 Merge pull request #9826 from icecrime/8318_whitespace_add_copy
Support whitespace in paths for ADD and COPY
Upstream-commit: 50ff27caa13b4c558b0ddc9f65297b6ef6eb119d
Component: engine
2015-01-19 18:37:53 -05:00
bea4f60ac9 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: cf455017e059e4b52d8d0357070e24ee153e3069
Component: engine
2015-01-13 11:34:15 -08:00
1f0a72e010 Specify ENV variables are also used for CMD.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
Upstream-commit: 66387aee5970a9b100f0d14612d7b7726eaf7b9d
Component: engine
2015-01-07 10:07:44 -08:00
1a4a1b2193 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: 6d801a3caa54ad7ef574bc426aa1ffc412c5af82
Component: engine
2015-01-06 10:57:48 -08:00
4af408b6c1 Merge pull request #9635 from duglin/Issue3936
Allow for relative paths on ADD/COPY
Upstream-commit: 364720b5e7e725cdc466171de873eefdb8609a33
Component: engine
2014-12-18 06:58:50 -08:00
a9b8d39261 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: f21f9f856e9d5af23521f131799028c2e67c04ed
Component: engine
2014-12-18 05:13:04 -08:00
912c56d931 add Scott's link checker script, and fix what it finds
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: fbb9223b1adc16834768acaa7a5776697825deb2
Component: engine
2014-12-16 14:46:25 +10:00
8985d88694 Fix dead link build.md
Upstream-commit: 7754ef1f064be08419bf397e2ea7e4ce99bdf90d
Component: engine
2014-12-01 19:35:58 +05:30
b86446758b Merge pull request #9332 from jacobat/patch-1
Update documentation for EXPOSE
Upstream-commit: 353ff40181276a0278b323e569cc887d0510ae69
Component: engine
2014-11-29 09:27:49 -05:00
af8a86ae0c 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: 8432224f0ef628b3da42def046e48f9635aa4b23
Component: engine
2014-11-29 15:18:18 +01:00
b9f89e5866 Fix a small typo
Signed-off-by: Michael Steinert <mike.steinert@gmail.com>
Upstream-commit: 8b881df9b1f3c8fa7c36dd5b2fb3e7235f6d4654
Component: engine
2014-11-26 13:09:44 -06:00
17282d5feb Add an example that shows starting apache in the foreground
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 8d3b13bd7a14aa41eb3d3f3aab1b974af1db4a50
Component: engine
2014-11-20 14:21:05 -08:00
f435c304cd Merge pull request #8251 from duglin/Issue2333
Add support for ENV of the form: ENV name=value ...
Upstream-commit: 58b6f31a7a3157b5ece418da0a976a28dae9841d
Component: engine
2014-11-20 13:12:24 -08:00
5dafd01fe8 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: 1314e1586f8cd6201c16161eb960a743c727946b
Component: engine
2014-11-20 09:54:28 -08:00
9cd25b81c7 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: b4346c4810c4801e8885485b2bf0311f1b6d00ec
Component: engine
2014-11-18 04:33:53 -08:00
08bbce0a2c Merge pull request #8840 from decadent/fix-da-copy-directive-reference
Nuh uh... quoth the build log: Source can't be a URL for COPY
Upstream-commit: d6a4d045f7f5eef0f8cbf64bee330aefed6919c1
Component: engine
2014-11-11 10:57:00 -08:00
2f7c6a8c08 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: 2e482c86bc14ddd4cfa45281dcf8f9ca141c9f14
Component: engine
2014-11-07 13:58:05 -08:00
d833712ff9 Merge pull request #8874 from whoshuu/patch-1
Fix apparent copy paste mistake
Upstream-commit: f10fefe408d2b6b40191d802c5244ea6379954f9
Component: engine
2014-11-05 12:24:53 -08:00
3856bb0808 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: de9bf24750e0a9774a475eae74cbd2c241224e10
Component: engine
2014-11-01 14:04:51 -07:00
a8e1069f16 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: b16f3736edf2427761cbc1c8fc5c4892299b2232
Component: engine
2014-10-30 23:22:51 -04:00
a5d878d96b 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: ed5e776a2235dd185423749acb9b306bb6067945
Component: engine
2014-10-29 12:36:38 +03:00
025009b453 Merge pull request #8762 from fredlf/tutorial-tweaks
Tweaks to Dockerfile tutorial
Upstream-commit: 01454a50cc3fe2bd5a86befa69427dc2bbaa604e
Component: engine
2014-10-28 22:04:23 -04:00
57b27c44c9 builder: Update documentation WRT environment replacement
Docker-DCO-1.1-Signed-off-by: Erik Hollensbe <github@hollensbe.org> (github: erikh)
Upstream-commit: e377716b377ccc4854f810bbfc3e65a7858163ed
Component: engine
2014-10-27 23:37:27 +00:00
20fbd71b3d 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: cc45b13ad4e4384f016764c15a52eda95eb548a4
Component: engine
2014-10-24 12:00:47 -07:00
4761e6734e 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: 0390d04d8a236c427f553ead4328f6b4947a61ef
Component: engine
2014-10-23 12:12:08 +10:00
38ac7b23be 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: 18141652ba4654458e0cd78dbabe6fc6cc1729ee
Component: engine
2014-10-19 10:16:30 -07:00
6c9c0cbd11 Merge pull request #8341 from unclejack/add_workdir_test
add test for workdir env vars and add docs
Upstream-commit: 40cad37f0a4f182150476a577196af29da142fc1
Component: engine
2014-10-07 14:27:32 +10:00
16bdc4eee3 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: 98ceae1a8499979f725bd04dfbc47ccf831331a7
Component: engine
2014-10-03 05:18:25 -07:00
65b99b3138 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: 2c5b5cfc929c8d6ffaefcbc85d2c9ad16ad301b8
Component: engine
2014-10-01 17:34:36 +03:00
ad2a93f102 Merge pull request #8281 from dfarrell07/master
Doc update to clarify EXPOSE vs -p functionality.
Upstream-commit: 8128339bc8fe3ed7f5c8fd9cc69a73d2dd519a83
Component: engine
2014-09-29 18:55:11 -07:00
a100820f28 Merge pull request #8280 from duglin/Issue3636
Add more info about when build cache is invalidated/used - Issue #3636
Upstream-commit: 4b311e1bd28fb658fe486e99b0d82867bfdd1037
Component: engine
2014-09-29 21:52:42 -04:00
aa28ecc957 Doc update to clarify EXPOSE vs -p functionality.
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
Upstream-commit: 5730abc16728404c328b896c893f9487effbec55
Component: engine
2014-09-29 20:59:12 -04:00
9405298e4e 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: 83f0f46b7c0475ae1da329cd97a8c0a67bdc2a6a
Component: engine
2014-09-29 14:13:39 -07:00
3ecb3c4d7a Merge pull request #8230 from duglin/Issue6820
add wildcard support to COPY/ADD (part 2 of issue #6820)
Upstream-commit: 1cd6135972bda50f913315910baba1b17d097338
Component: engine
2014-09-29 11:19:01 -07:00
fbb83ba5bc add wildcard support to copy/add
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: acd40d50799a117c4e7c318abdbc8c14b9eb1632
Component: engine
2014-09-25 20:44:51 -07:00
d851131502 Merge pull request #7994 from erikh/parser_fix_volume_parsing
builder: Fix handling of VOLUME command where multiple volumes are specified in a space delimited list.
Upstream-commit: d369612b416484301e172bfae3fc692e9c176faf
Component: engine
2014-09-25 12:45:48 -04:00
cdd6c2350b 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: a5ca549a18fb5c1006005cc220ab330eec3018de
Component: engine
2014-09-25 09:44:19 -07:00
134a1a90ab Merge pull request #8197 from fredlf/adding_official-repo-guidelines
Docs for Official Repo release
Upstream-commit: 8dd11c7175147d31761b647daac10fb18f0420c2
Component: engine
2014-09-23 20:55:07 -07:00
756d3489d5 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: d9fd5f6199aebb9ea784f5b23ec97b960f89f3d4
Component: engine
2014-09-23 14:21:00 -07:00
55b8ec78cc 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: 05b8a1eb363ce03a9dfa3315fbac59c42af2df54
Component: engine
2014-09-18 20:12:13 -07:00
cd4d60a084 Consistently use 'sudo docker' in examples
Docker-DCO-1.1-Signed-off-by: Sven Dowideit <SvenDowideit@docker.com> (github: SvenDowideit)
Upstream-commit: fc9a3b1c1b835c170a4916362855e127a0e366e1
Component: engine
2014-09-16 11:49:05 +10:00
17af1eaec1 Add notes about single-quotes
Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: b47a2fbdc545d649a945e78a22da0c5dd9df0921
Component: engine
2014-09-11 10:19:07 -07:00
4300ef9d0c 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: 98dd982586ed9fd99853001d4a27503180e432c4
Component: engine
2014-08-19 17:22:11 -07:00
f066236203 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: b63c10558e6fe187d9cee25a4d8bad4bffd7f79b
Component: engine
2014-08-19 13:39:50 -07:00
811bdfdcea fix for issue 7281
add missing comma per O.S. Tezer's commment

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 55dc4f2b94f68e9e1b4e73b1f21cf5151f86e8f8
Component: engine
2014-08-09 08:11:59 -04:00
7b0cf887d4 Merge pull request #7460 from suzaku/fix_docs
Make it clear that JSON array format should be used if CMD is used as default arguments
Upstream-commit: 0ca010695cc504c1a27cfb939e2580e0515caec1
Component: engine
2014-08-08 12:10:01 +10:00
bde3f4cb22 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: 6e0f072e36d7b367bde7b5c34fda9c47f36af2da
Component: engine
2014-08-07 15:06:09 +08:00
7751a70b6e Fix example of relative WORKDIR
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
Upstream-commit: 5514afcd88d40a7a9321a966292e9f724eeafc36
Component: engine
2014-08-03 12:28:25 +04:00