Commit Graph

61 Commits

Author SHA1 Message Date
58c0f4ebe8 Merge pull request #14579 from hqhq/hq_add_softlimit
Add support for memory reservation
Upstream-commit: 84b53c8d87c0ab887209a51e54fad60a591e737a
Component: engine
2015-09-24 12:11:36 -07:00
a505c19468 fix content-type of response for /commit
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Upstream-commit: 78de066a28c5e01524401840ff4d1ae76e8e0fc2
Component: engine
2015-09-23 23:49:16 +02:00
4f3fe3187a Add support for memory reservation
Signed-off-by: qhuang <qhuang@10.0.2.15>
Upstream-commit: aa1780997f42a3fbe3a7f9c7be2b8a5092b9b7c1
Component: engine
2015-09-23 14:02:45 +08:00
8e71940329 add docker server version to /info
Signed-off-by: Zhang Kun <zkazure@gmail.com>
Upstream-commit: 7cf343d1064e3d8211597c67574ff4ddff316fa1
Component: engine
2015-09-21 21:15:32 +08:00
cdae9e4a30 events/jsonmessage: add and prefer TimeNano for events
This way provide both Time and TimeNano in the event. For the display of
the JSONMessage, use either, but prefer TimeNano Proving only TimeNano
would break Subscribers that are using the `Time` field, so both are set
for backwards compatibility.

The events logging uses nano formatting, but only provides a Unix()
time, therefor ordering may get lost in the output. Example:
```
2015-09-15T14:18:51.000000000-04:00 ee46febd64ac629f7de9cd8bf58582e6f263d97ff46896adc5b508db804682da: (from busybox) resize
2015-09-15T14:18:51.000000000-04:00 a78c9149b1c0474502a117efaa814541926c2ae6ec3c76607e1c931b84c3a44b: (from busybox) resize
```

By having a field just for Nano time, when set, the marshalling back to
`time.Unix(sec int64, nsec int64)` has zeros exactly where it needs to.
This does not break any existing use of jsonmessage.JSONMessage, but now
allows for use of `UnixNano()` and get event formatting that has
distinguishable order. Example:
```
2015-09-15T15:37:23.810295632-04:00 6adcf8ed9f5f5ec059a915466cd1cde86a18b4a085fc3af405e9cc9fecbbbbaf: (from busybox) resize
2015-09-15T15:37:23.810412202-04:00 6b7c5bfdc3f902096f5a91e628f21bd4b56e32590c5b4b97044aafc005ddcb0d: (from busybox) resize
```

Including tests for TimeNano and updated event API reference doc.

Signed-off-by: Vincent Batts <vbatts@redhat.com>
Upstream-commit: 4026512a2c535fe377a4cf834b7a78fccfd82dab
Component: engine
2015-09-18 13:15:26 -04: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
655513db24 Add support for DNS options
Signed-off-by: Tim Hockin <thockin@google.com>
Upstream-commit: 3d4685e258a7729bd0f8cc411b5a73980a9faa20
Component: engine
2015-09-16 14:06:45 -07:00
c71aa53e3d Refactor the statistics of network in docker stats
For now docker stats will sum the rxbytes, txbytes, etc. of all
the interfaces.

It is OK for the output of CLI `docker stats` but not good for
the API response, especially when the container is in sereval
subnets.

It's better to leave these origianl data to user.

Signed-off-by: Hu Keping <hukeping@huawei.com>
Upstream-commit: d3379946ec96fb6163cb8c4517d7d5a067045801
Component: engine
2015-09-15 15:40:34 +08:00
c88accb730 Fix typos in REST API documentation
Replace comma with column
Remove extra curly brace

Fix typo in REST API documentation

Replace comma with column in documentation.

Signed-off-by: Adrian Oprea <adrian@codesi.nz>

Remove extra curly brace

Remove extra curly brace from remote API docs.

Signed-off-by: Adrian Oprea <adrian@codesi.nz>
Upstream-commit: 18d856f55adfd37da5023867e9a63bbfe331dc01
Component: engine
2015-09-14 11:18:41 +03:00
862065b3b2 Add log reading to the journald log driver
If a logdriver doesn't register a callback function to validate log
options, it won't be usable.  Fix the journald driver by adding a dummy
validator.

Teach the client and the daemon's "logs" logic that the server can also
supply "logs" data via the "journald" driver.  Update documentation and
tests that depend on error messages.

Add support for reading log data from the systemd journal to the
journald log driver.  The internal logic uses a goroutine to scan the
journal for matching entries after any specified cutoff time, formats
the messages from those entries as JSONLog messages, and stuffs the
results down a pipe whose reading end we hand back to the caller.

If we are missing any of the 'linux', 'cgo', or 'journald' build tags,
however, we don't implement a reader, so the 'logs' endpoint will still
return an error.

Make the necessary changes to the build setup to ensure that support for
reading container logs from the systemd journal is built.

Rename the Jmap member of the journald logdriver's struct to "vars" to
make it non-public, and to make it easier to tell that it's just there
to hold additional variable values that we want journald to record along
with log data that we're sending to it.

In the client, don't assume that we know which logdrivers the server
implements, and remove the check that looks at the server.  It's
redundant because the server already knows, and the check also makes
using older clients with newer servers (which may have new logdrivers in
them) unnecessarily hard.

When we try to "logs" and have to report that the container's logdriver
doesn't support reading, send the error message through the
might-be-a-multiplexer so that clients which are expecting multiplexed
data will be able to properly display the error, instead of tripping
over the data and printing a less helpful "Unrecognized input header"
error.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com> (github: nalind)
Upstream-commit: e611a189cb3147cd79ccabfe8ba61ae3e3e28459
Component: engine
2015-09-11 16:50:03 -04: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
d563cc164c Signal to stop a container.
Allow to set the signal to stop a container in `docker run`:
- Use `--stop-signal` with docker-run to set the default signal the container will use to exit.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 0e50d946a25beb134bce2aaf4a209b5cfcbacf8f
Component: engine
2015-09-10 19:56:05 -04:00
9f56a7069d Added tags list to /images/:id/json api.
It closes #10139.

Signed-off-by: Rozhnov Alexandr <nox73@ya.ru>
Upstream-commit: e9e68fa2d29a5e3053fb876b19b5ac5bc6d1c222
Component: engine
2015-09-10 11:55:01 +03:00
56082f8faa Add awslogs driver for Amazon CloudWatch Logs
Signed-off-by: Samuel Karp <skarp@amazon.com>
Upstream-commit: 3effe484e6f572298d0c3490517f57391617aa51
Component: engine
2015-09-09 13:52:40 -07:00
154c412ece Merge pull request #15798 from calavera/volume_driver_host_config
Move VolumeDriver to HostConfig to make containers portable.
Upstream-commit: 9ca4aa479788867cd2dce161efa1e43ea5dfc14f
Component: engine
2015-09-08 22:05:40 -04:00
350911ed1c Move VolumeDriver to HostConfig to make containers portable.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 6549d6517bf9a7c79d21a86cbf36af10fcdbfbe0
Component: engine
2015-09-04 12:42:44 -04:00
3b4e85f885 Clean latest api doc from PortMapping and outdated error check
Regarding the outdated error check, there's no `docker.PortMapping`
struct anymore and this is linked to something really old #1334

Signed-off-by: Antonio Murdaca <runcom@linux.com>
Upstream-commit: 137c12f19a6838eeebfd45c459b883bb69f53d36
Component: engine
2015-09-03 11:01:55 +02:00
186d7f8a00 [docs] Add description of "X-Registry-Config"
The structure of this header has never been specified in the docs and has
been a pain point for those who have tried to get registry authentication
to work during builds. This Patch *finally* adds a description of JSON
object which should be base64-url-safe-encoded and used as the value of
the X-Registry-Config HTTP request header during `POST /build`.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 61de9629799094d579068899ca407d5034183e0f
Component: engine
2015-09-01 10:05:30 -07:00
5950954f43 Merge pull request #15023 from hqhq/hq_add_status_in_inspect
Add status string to State field for inspect
Upstream-commit: 6caaa8a63544c052d757aecee93d3488b7b3d9e2
Component: engine
2015-08-28 08:27:36 -07:00
2dc587d949 Merge pull request #15843 from MHBauer/version-order
reweight api doc for v1.21 to correct the order.
Upstream-commit: ea65c38ac0972709cdb371ce6b1886eb252a126e
Component: engine
2015-08-26 13:51:06 -07:00
ebcab8fd5d reweight api doc for v1.21 to correct the order.
Signed-off-by: Morgan Bauer <mbauer@us.ibm.com>
Upstream-commit: 31a52a31c661fedc671e53c3706bc294f8bf6b1c
Component: engine
2015-08-26 13:40:37 -07:00
bfe1bbc7d2 Add volume API/CLI
Signed-off-by: Brian Goff <cpuguy83@gmail.com>
Upstream-commit: b3b7eb2723461b1eb4be692f4bced0ae8ea9cb58
Component: engine
2015-08-26 13:37:52 -04:00
5e196ef2cc Fix json examples in the api reference.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 7296c845b739ae4133e3d02d56cb7e8df29eb020
Component: engine
2015-08-25 10:55:12 -04:00
83ec490c79 Merge pull request #15348 from tonistiigi/11008-always-unless-stopped-restart-policy
Add always-unless-stopped restart policy
Upstream-commit: fd8b25c802780683cc5776e6d3aaca9536e7370b
Component: engine
2015-08-24 13:48:56 -04:00
3004521c7f Add support for kernel memory limit
Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: b6f1b4ad350cbf1f540797eee44520694237d47c
Component: engine
2015-08-19 23:56:55 +08:00
2bf42179ec Add unless-stopped restart policy
Fixes #11008

Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
Upstream-commit: 10305dc5e8cc7e2e1560ce2abe93c17e923a1c47
Component: engine
2015-08-18 11:39:06 -07:00
63ab074ee2 Merge pull request #15237 from charleswhchan/patch-3
Reformat /containers/(id)/resize to make it consistent with other sections.
Upstream-commit: bba762b19254b8315aa8d5a6a63cb00253eaa42c
Component: engine
2015-08-16 10:59:16 +02:00
5ba2c88bd5 Reformat /containers/(id)/resize to make it consistent with "Exec Resize" section.
Signed-off-by: Charles Chan <charleswhchan@users.noreply.github.com>
Upstream-commit: 6cd2d8946902eddab5e3902efeef3c7ffd748a1e
Component: engine
2015-08-15 19:47:01 -07:00
a3fa37d61e Fixes after release
Adding in a link about the deprecated material
Fixing bad link to staging

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 8b09f8a302eaf7d73015112a774010e57e7f2c25
Component: engine
2015-08-11 23:13:14 -07:00
ad80c7d292 Initial work
Removing references to regsitry 1.0, pointing to distribution
Updating links and title
Adding in comments

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: d550d729e14d1a18d00b66a941da5b23b9a61bd3
Component: engine
2015-08-10 17:43:41 -07:00
c72c9f1bde Merge pull request #15411 from moxiegirl/fix-links-15349
Fixes #15349 too many apis
Upstream-commit: 8e05a3e30f931726cd5f8a397e5517802cb96efb
Component: engine
2015-08-09 20:52:49 +02:00
2c6e673ce7 typofix - https://github.com/vlajos/misspell_fixer
Signed-off-by: Veres Lajos <vlajos@gmail.com>
Upstream-commit: 514623272398574c8fd7ef3fe42c5b2ae161349a
Component: engine
2015-08-07 23:25:49 +01:00
7b7445d1b7 Fixes #15349 too many apis
Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 1d5f479e01388e1bffcd61f9c3896093ac82d5d0
Component: engine
2015-08-07 11:37:05 -07:00
e2641596d8 Fix #15212: Add "Labels" key to output of /containers/json
Applied retroactively from API v1.18 - v1.21.

Signed-off-by: Charles Chan <charleswhchan@users.noreply.github.com>
Upstream-commit: b245bcd458492c9b348b790a9422dd7478f9af83
Component: engine
2015-08-03 18:11:33 -07:00
091a1141be Update docker_remote_api.md
Minor fixes:
* v1.19: GET /containers/(id)/logs - add missing '/'
* v1.18: Break up POST /containers/create and POST /containers/(id)/start into separate lines.

Signed-off-by: Charles Chan <charleswhchan@users.noreply.github.com>
Upstream-commit: 084d46408160cf309bb7730a0ccb7fdd2f71c84e
Component: engine
2015-08-02 10:11:18 -07:00
0a7e55f30a Fix docker cp Behavior With Symlinks
[pkg/archive] Update archive/copy path handling

  - Remove unused TarOptions.Name field.
  - Add new TarOptions.RebaseNames field.
  - Update some of the logic around path dir/base splitting.
  - Update some of the logic behind archive entry name rebasing.

[api/types] Add LinkTarget field to PathStat

[daemon] Fix stat, archive, extract of symlinks

  These operations *should* resolve symlinks that are in the path but if the
  resource itself is a symlink then it *should not* be resolved. This patch
  puts this logic into a common function `resolvePath` which resolves symlinks
  of the path's dir in scope of the container rootfs but does not resolve the
  final element of the path. Now archive, extract, and stat operations will
  return symlinks if the path is indeed a symlink.

[api/client] Update cp path hanling

[docs/reference/api] Update description of stat

  Add the linkTarget field to the header of the archive endpoint.
  Remove path field.

[integration-cli] Fix/Add cp symlink test cases

  Copying a symlink should do just that: copy the symlink NOT
  copy the target of the symlink. Also, the resulting file from
  the copy should have the name of the symlink NOT the name of
  the target file.

  Copying to a symlink should copy to the symlink target and not
  modify the symlink itself.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: 75f6929b449a59335572436862d644afacf55cdb
Component: engine
2015-07-30 12:14:28 -07:00
06f659e1d1 Remove references to boot2docker replace with docker-machine
- boot2docker is deprecated in the 1.8.0
- docker-machine replaces it
- this fixes #14563
- Updating with thaJetzah comments

Signed-off-by: Mary Anthony <mary@docker.com>
Upstream-commit: 1825e06944db20ec677aa8d26b36e9036b0dd257
Component: engine
2015-07-27 18:25:50 -07:00
0148655e94 Add status string to State field for inspect
Fixes: #13579

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: fed85c32963b8254a56c527a3251358ead47d798
Component: engine
2015-07-28 08:48:27 +08:00
a4c7971630 Bump api version to 1.21.
Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 0eb88a0751365050cb177e16196622fd1d322efc
Component: engine
2015-07-27 09:48:47 -07:00
87314dfb81 Clarify filters option in list containers and list images docs
Based on the list containers with filters options it would seem that filtering containers with label `test=docker-java` could be done with `{"test":["docker-java"]}` which doesn't work

The options that work are `{"label":["test"]}` and `{"label":["test=docker-java"]}`

As seen in https://github.com/docker-java/docker-java/pull/262

Signed-off-by: Carlos Sanchez <carlos@apache.org>
Upstream-commit: 1fb29e6c3c13127912d1de9233f2aaaf63ec0ee8
Component: engine
2015-07-24 11:57:18 +02:00
fbf6d59e07 Update docs to use the new docker daemon command
Signed-off-by: Tibor Vass <tibor@docker.com>
Upstream-commit: e246f1e4eec3290f343627e73a926b940b77b121
Component: engine
2015-07-23 20:31:43 -04:00
b1387e7404 Add filter to /images/json docs
Closes #14894

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: a20bf5e61c542fea377345d5318293b44c65cbb5
Component: engine
2015-07-23 05:29:09 -07:00
6f661b9f5c Merge pull request #14580 from rohitkadam19/patch-1
Update docker_remote_api_v1.17.md
Upstream-commit: a3857cc3799e2a92b92f07842c03b442490f01ab
Component: engine
2015-07-22 19:22:37 -04:00
2d8d0361a7 Merge pull request #13711 from calavera/version_volumes_inspect
Expose new mount points structs in inspect.
Upstream-commit: 50d2597e490c4636ee8cacabf34bb9ed3e21d3fc
Component: engine
2015-07-22 09:02:00 +02:00
b821d19c27 Expose new mount points structs in inspect.
Keep old hashes around for old api version calls.

Signed-off-by: David Calavera <david.calavera@gmail.com>
Upstream-commit: 1c3cb2d31ea722e2c174bf78eda62fec6949fb8b
Component: engine
2015-07-21 15:33:05 -07:00
b4919d1406 docs: Updated for docker cp and its API changes
Documented changes to API to enable new `docker cp` behavior.

Added documentation on `docker cp` usage and behavior.

Docker-DCO-1.1-Signed-off-by: Josh Hawn <josh.hawn@docker.com> (github: jlhawn)
Upstream-commit: e54b1e081ae15a71e758f7d2691dc2bff3f66e02
Component: engine
2015-07-21 15:30:20 -07:00
d824694b36 add gradle-docker-plugin, update docker-client url
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Upstream-commit: a51684ff8f44a8c54a8724847fe345487f478d14
Component: engine
2015-07-19 21:28:11 +02:00
e480c92f68 remove unused row-even and row-odd css classes
Signed-off-by: Tobias Gesellchen <tobias@gesellix.de>
Upstream-commit: 38e7069668e4a690bd47108db26f8d6f9966e414
Component: engine
2015-07-19 21:27:12 +02:00
abf0842b64 Add missing 'Names' field to /containers/json API output
Closes #14675

Wasn't sure how far back I needed to go so I did just a few.

Signed-off-by: Doug Davis <dug@us.ibm.com>
Upstream-commit: 081991c01e13c60af725bea91c4f5598dbcceaa9
Component: engine
2015-07-16 08:23:55 -07:00