Commit Graph

59 Commits

Author SHA1 Message Date
86b04a6a8a Merge pull request #22489 from Microsoft/jjh/shell
Builder shell configuration
Upstream-commit: df1dd1322d5c9527be7187038ca3480404b1282b
Component: engine
2016-06-05 17:43:12 +02:00
f88056a4aa Merge pull request #23232 from thaJeztah/update-default-retries
Healthcheck: set default retries to 3
Upstream-commit: 3db23a4eaf19d347c486f0f0ae764ea1b84491c0
Component: engine
2016-06-04 07:50:04 +02:00
d5ece41dcd Builder default shell
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: b18ae8c9ccc2eb6cf8aa947f25eb6f1d20089776
Component: engine
2016-06-03 13:54:31 -07:00
52ca58bbaa Healthcheck: set default retries to 3
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 50e470fab4ebdffff74bafeefa2f7fb8c21da13e
Component: engine
2016-06-03 13:28:08 +02:00
3dff30ced8 Add support for comment in .dockerignore
This fix tries to address the issue raised in #20083 where
comment is not supported in `.dockerignore`.

This fix updated the processing of `.dockerignore` so that any
lines starting with `#` are ignored, which is similiar to the
behavior of `.gitignore`.

Related documentation has been updated.

Additional tests have been added to cover the changes.

This fix fixes #20083.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
Upstream-commit: 8913dace341c8fc9f9a3ab9518c8521c161b307f
Component: engine
2016-06-02 19:06:52 -07:00
4524589dc5 Add support for user-defined healthchecks
This PR adds support for user-defined health-check probes for Docker
containers. It adds a `HEALTHCHECK` instruction to the Dockerfile syntax plus
some corresponding "docker run" options. It can be used with a restart policy
to automatically restart a container if the check fails.

The `HEALTHCHECK` instruction has two forms:

* `HEALTHCHECK [OPTIONS] CMD command` (check container health by running a command inside the container)
* `HEALTHCHECK NONE` (disable any healthcheck inherited from the base image)

The `HEALTHCHECK` instruction tells Docker how to test a container to check that
it is still working. This can detect cases such as a web server that is stuck in
an infinite loop and unable to handle new connections, even though the server
process is still running.

When a container has a healthcheck specified, it has a _health status_ in
addition to its normal status. This status is initially `starting`. Whenever a
health check passes, it becomes `healthy` (whatever state it was previously in).
After a certain number of consecutive failures, it becomes `unhealthy`.

The options that can appear before `CMD` are:

* `--interval=DURATION` (default: `30s`)
* `--timeout=DURATION` (default: `30s`)
* `--retries=N` (default: `1`)

The health check will first run **interval** seconds after the container is
started, and then again **interval** seconds after each previous check completes.

If a single run of the check takes longer than **timeout** seconds then the check
is considered to have failed.

It takes **retries** consecutive failures of the health check for the container
to be considered `unhealthy`.

There can only be one `HEALTHCHECK` instruction in a Dockerfile. If you list
more than one then only the last `HEALTHCHECK` will take effect.

The command after the `CMD` keyword can be either a shell command (e.g. `HEALTHCHECK
CMD /bin/check-running`) or an _exec_ array (as with other Dockerfile commands;
see e.g. `ENTRYPOINT` for details).

The command's exit status indicates the health status of the container.
The possible values are:

- 0: success - the container is healthy and ready for use
- 1: unhealthy - the container is not working correctly
- 2: starting - the container is not ready for use yet, but is working correctly

If the probe returns 2 ("starting") when the container has already moved out of the
"starting" state then it is treated as "unhealthy" instead.

For example, to check every five minutes or so that a web-server is able to
serve the site's main page within three seconds:

    HEALTHCHECK --interval=5m --timeout=3s \
      CMD curl -f http://localhost/ || exit 1

To help debug failing probes, any output text (UTF-8 encoded) that the command writes
on stdout or stderr will be stored in the health status and can be queried with
`docker inspect`. Such output should be kept short (only the first 4096 bytes
are stored currently).

When the health status of a container changes, a `health_status` event is
generated with the new status. The health status is also displayed in the
`docker ps` output.

Signed-off-by: Thomas Leonard <thomas.leonard@docker.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: b6c7becbfe1d76b1250f6d8e991e645e13808a9c
Component: engine
2016-06-02 23:58:34 +02:00
5bcb28804b Merge pull request #22268 from Microsoft/jjh/continuationescape
Support platform semantic file paths through ESCAPE
Upstream-commit: 8e924153e219d040e3aa672df4e0c7baff9f8d8b
Component: engine
2016-05-26 10:00:56 -07:00
db5e90b511 Docs: JSON vs Shell clarification
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: 0cacd4bee2197e66105d960507f2ccac0f040263
Component: engine
2016-05-20 20:56:08 -07:00
886f3ce26b Support platform file paths through escape
Signed-off-by: John Howard <jhoward@microsoft.com>
Upstream-commit: e8e3dd32c5bad727010ec787f484b98942977531
Component: engine
2016-05-20 20:29:59 -07:00
6d47664a6b Fix error for env variables example in docker reference
Signed-off-by: Charles Law <claw@conduce.com>
Upstream-commit: 2af7c5cfe24b4c8e931f751979b5e69e20ba77e2
Component: engine
2016-05-13 10:55:36 -07:00
7bad1decfe Correct docs for a docker container's clean-up.
The 'Unix Signals' (https://en.wikipedia.org/wiki/Unix_signal#Handling_signals) wiki explains that:
> 'There are two signals which cannot be intercepted and handled: SIGKILL and SIGSTOP.'

Signed-off-by: kevinmeredith <kevin.m.meredith@gmail.com>
Upstream-commit: ef7cd217663c7f6bff5f1d49461c004e86fed867
Component: engine
2016-05-11 14:58:23 -04:00
44c73694c8 Improve build cache miss doc for ARG and RUN
The documentation already says the cache miss happens only at `ARG`
variable usage, not declaration, but there is a very common implicit
usage: `RUN`, which this commit documents even more, improving on #21790.

Also, use `definition` instead of `declaration`: it's the same thing, and
`definition` is already used in this documentation, contrary to
`declaration`.

Also, distinguish between "instructions" and "variables defined by `ARG`
instructions".

Signed-off-by: Thomas Riccardi <riccardi@systran.fr>
Upstream-commit: 82f5ef2d2562f9e742eb694dc4b0a1f768a4f0de
Component: engine
2016-04-13 15:02:09 +02:00
09c84ecb5a make the cache miss clear
Signed-off-by: mikelinjie <294893458@qq.com>
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Upstream-commit: 66b8714da4e92b3587cbbf25116541f4de63169e
Component: engine
2016-04-06 00:48:21 -07:00
bec4433ff4 WORKDIR is like calling mkdir - but we've not told people
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: c937b43abd302b7643e0257a843ffda60f101fcc
Component: engine
2016-03-22 14:05:56 +10:00
9933657e25 Docs: add note about CMD and ENTRYPOINT commands
Signed-off-by: Tomasz Kopczynski <tomek@kopczynski.net.pl>
Upstream-commit: 1ed84770c52b0abd026fe9c1acc51f19d94fad12
Component: engine
2016-02-24 22:57:25 +01:00
6396772da2 add missing trailing slash in ADD and COPY /absoluteDir examples. According to the specs they are mandatory.
Signed-off-by: Bastiaan Bakker <bbakker@xebia.com>
Upstream-commit: f982f08c5097e25b901152289faf960d557c130e
Component: engine
2016-02-16 22:52:16 +01:00
697a990701 fix common misspell
Signed-off-by: Victor Vieux <vieux@docker.com>
Upstream-commit: 99a396902f0ea9d81ef87a683489b2435408f415
Component: engine
2016-02-11 15:49:36 -08:00
7637bcdb16 Fix typo
Signed-off-by: Prayag Verma <prayag.verma@gmail.com>
Upstream-commit: 86beb6e27e9954e50828993ef0fb44486d2318ab
Component: engine
2016-02-01 01:25:59 +05:30
e734434f58 Creating Engine specific menu
Fixing the links
Updating with Seb's comments
Adding weight
Fixing the engine aliases
Updating after Arun pushed
Removing empty file

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: e310d070f498a2ac494c6d3fde0ec5d6e4479e14
Component: engine
2016-01-26 15:58:53 -08:00
5246f2719a Add some helper text for magical ADD
Closes: #15777

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 8d94a85d62d6945be1217446738d856b3c2e2ddc
Component: engine
2016-01-22 10:13:13 -08:00
7ad15b069e Fix ambassador script based on SvenDowideit/dockerfiles#37
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: cc44ea21e481d34ab9621afd6944b6c14a23106a
Component: engine
2016-01-08 20:55:22 +00:00
713c4dbaf0 Add some docs about build-arg's impact on the cache
Closes #18017

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 5bf4766fcaae80b80d53cce88987a8d3a9ac357e
Component: engine
2015-11-23 08:51:11 -08:00
6df421c14f Fixes found by docs validation tool
Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
Upstream-commit: 043f447e2e9ecb9d6f34bcee6c11f20f263baf66
Component: engine
2015-11-23 11:19:38 +10:00
aac6b83468 Merge pull request #17090 from duglin/dockerignoreWildcards
Support multi-dir wildcards in .dockerignore
Upstream-commit: f5e318a17b8bd3126281add5e82dfb09be5b8f11
Component: engine
2015-11-13 14:29:34 -08:00
775e6c0f07 Support multi-dir wildcards in .dockerignore
Closes #13113

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: eddb14a44eb3ca6ba0b5e6906e21d767eba1af86
Component: engine
2015-11-13 13:44:07 -08:00
ecd671294f First pass at consolidating
Removing old networking.md
Updating dockernetworks.md with images
Adding information on network plugins
Adding blurb about links to docker networking
Updating the working documentation
Adding Overlay Getting Started
Downplaying links by removing refs/examples, adding refs/examples for network.
Updating getting started to reflect networks not links
Pulling out old network material
Updating per discussion with Madhu to add Default docs section
Updating with bridge default
Fix bad merge
Updating with new cluster-advertise behavior
Update working and NetworkSettings examples
Correcting example for default bridge discovery behavior
Entering comments
Fixing broken Markdown Syntax
Updating with comments
Updating all the links

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 9ef855f9e5fa8077468bda5ce43155318c58e60e
Component: engine
2015-11-02 21:14:55 -08:00
a4eeeb73b3 Add ability to add multiple tags with docker build
Signed-off-by: Shijiang Wei <mountkin@gmail.com>
Upstream-commit: c2eb37f9aeb6215293483e02613514e49011cf2c
Component: engine
2015-10-24 00:59:56 +08:00
57010d523d Merge pull request #16801 from aidanhs/aphs-add-socat-t
Update ambassador image, use the socat -t option
Upstream-commit: b826215c575e320f0cad7c07f8bfdf85437c1be9
Component: engine
2015-10-20 14:24:25 +10:00
00116420f7 updating docs for EXPOSE option on run command; fixes #16634
Signed-off-by: Mike Brown <brownwm@us.ibm.com>
Upstream-commit: d955fdb9ac279d5ea8e5fd20719eda579cca97ed
Component: engine
2015-10-13 10:43:27 -05:00
6b6c7cc2b6 Enabled GitHub Flavored Markdown
GitHub flavored markdown is now supported for links and images. Also, ran LinkChecker and FileResolver. Yay!
Fixes from Spider check
Output for docker/docker now goes into engine directory

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 8fee1c2020186ac100b45e64864b94ae3a169ad5
Component: engine
2015-10-11 07:49:54 -07:00
282a5880a8 Merge pull request #15265 from greaber/dockerignore-docs
Further clarifications to .dockerignore docs
Upstream-commit: df6cd114a04e343c1f6f2637857bed3c5924873c
Component: engine
2015-10-08 06:24:44 -07:00
5e87c46dcd clarify dockerignore semantics
Signed-off-by: Grant Reaber <grant.reaber@gmail.com>
Upstream-commit: 899ecc11c521d536f26b2e2f062382930dd6ff99
Component: engine
2015-10-07 15:51:57 -05:00
917e7739ac Mention more realistic examples are available
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: 4cb0790a620924a9fe5d751c6c7e6b37183697df
Component: engine
2015-10-07 11:45:57 +01:00
000787bb0d Don't put dockerfiles in one continuous code block
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: 6a1a192e072cc44d80230626071efe756d77d373
Component: engine
2015-10-06 22:58:42 +01:00
6826353451 Update ambassador image, use the socat -t option
Signed-off-by: Aidan Hobson Sayers <aidanhs@cantab.net>
Upstream-commit: f9a1c8fc64901423a027b07ba692fe48118d67ce
Component: engine
2015-10-06 13:42:06 +01:00
71b700b568 Merge pull request #16109 from charleswhchan/patch-3
Touch up "Dockerfile reference"
Upstream-commit: 486c12525f27dd51c89cde910c5ea06665824095
Component: engine
2015-09-27 15:12:17 -07:00
2f753b8d99 Touch up "Dockerfile reference"
- add example for `docker build -f ...`
- modifiy `FROM` explaination into bullet points
- add/clarify examples for `LABEL` and `ADD` instructions
- fix review comments (PR #16109)

Signed-off-by: Charles Chan <charleswhchan@users.noreply.github.com>
Upstream-commit: 60f76bbfe1baaa0c1cc94b997022df6b8c44f07f
Component: engine
2015-09-27 08:04:36 -07:00
798ccba56f Merge pull request #16338 from twaugh/env-replacement-label
Add documentation note that LABEL allows environment replacement
Upstream-commit: f8f03a290c98063936643c26a0345439a25fe1a7
Component: engine
2015-09-27 08:00:53 -07:00
0b8d66eb11 Add documentation note that LABEL allows environment replacement
Signed-off-by: Tim Waugh <twaugh@redhat.com>
Upstream-commit: ea4d70bdfd55ee2018674e5878031566e58b8fd1
Component: engine
2015-09-16 14:47:01 +01:00
2051b748c0 incorporate doc review comments
Signed-off-by: Madhav Puri <madhav.puri@gmail.com>
Upstream-commit: 8cfcd8738070f24bd66e3b7ed46c6459df3fa9a3
Component: engine
2015-09-16 03:31:15 -07:00
ded3de600a Support for passing build-time variables in build context
- The build-time variables are passed as environment-context for command(s)
run as part of the RUN primitve. These variables are not persisted in environment of
intermediate and final images when passed as context for RUN. The build environment
is prepended to the intermediate continer's command string for aiding cache lookups.
It also helps with build traceability. But this also makes the feature less secure from
point of view of passing build time secrets.

- The build-time variables also get used to expand the symbols used in certain
Dockerfile primitves like ADD, COPY, USER etc, without an explicit prior definiton using a
ENV primitive. These variables get persisted in the intermediate and final images
whenever they are expanded.

- The build-time variables are only expanded or passed to the RUN primtive if they
are defined in Dockerfile using the ARG primitive or belong to list of built-in variables.
HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy, FTP_PROXY and NO_PROXY are built-in
variables that needn't be explicitly defined in Dockerfile to use this feature.

Signed-off-by: Madhav Puri <madhav.puri@gmail.com>
Upstream-commit: 54240f8da9992880e20a1508e9a6f0e59f2adef1
Component: engine
2015-09-16 03:31:15 -07:00
a212a2f525 update documentation styling as per suggestions
Signed-off-by: Amen Belayneh <amenbelayneh@gmail.com>
Upstream-commit: 30164588d6be5d5a07b079719f15cf2da06322d2
Component: engine
2015-09-14 19:08:27 +08:00
66cf279f4c add a documentation note on backslash usage in shell form of RUN
Signed-off-by: Amen Belayneh <amenbelayneh@gmail.com>
Upstream-commit: 6a55d953349eddaf502ff2db6c727e97a5dde3db
Component: engine
2015-09-12 15:42:18 +08:00
1e38e54eff Add STOPSIGNAL instruction to dockerfiles.
This way, images creators can set the exit signal their programs use.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 3781cde61ff10b1d9114ae5b4c5c1d1b2c20a1ee
Component: engine
2015-09-10 19:56:05 -04:00
1a4eeac4c4 add missing instruction
Signed-off-by: bin liu <liubin0329@gmail.com>
Upstream-commit: 1988064ef2abe5273fbcc8910b0177ad2b85bd54
Component: engine
2015-08-19 18:43:19 +08:00
717cb5744e remove references to 'source repository'
- rewrite intro to Dockerfile reference usage section to remove
   references to 'source repository'
- Closes #14714
- Fixes:  #8648
- Updating with Seb's comments

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: b143c05d64c4532b090d1f718ab93b4f7b1c466c
Component: engine
2015-08-18 15:50:42 -07:00
fdd77b46c5 Updating hashcode links to commands
Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 85c2c771884aaa73b65753bdbdf31d596cd90111
Component: engine
2015-08-18 12:25:59 -07:00
68b94ae6c4 Merge pull request #15337 from phemmer/doc-builder-volume
add documentation clarifying behavior of VOLUME instruction
Upstream-commit: 7ae6a505f21237f30e862e0a6a24da711558bc29
Component: engine
2015-08-18 09:42:00 -07:00
ee022d610e Fixing docs to remove references to links under terms/
Removed terms/ directory

Signed-off-by: Dharmit Shah <shahdharmit@gmail.com>
Upstream-commit: 0a925d07a8f87a8333ded429da656a711fd06214
Component: engine
2015-08-15 13:09:29 +05:30
9b317da6c1 Remove note from docker version 1.3 on Env variables
Fixes #14734

Signed-off-by: Ankush Agarwal <ankushagarwal11@gmail.com>
Upstream-commit: 89ec5399aff830ed0b00ff24610969fbf9ad4fdc
Component: engine
2015-08-07 14:36:06 -07:00