Commit Graph

1561 Commits

Author SHA1 Message Date
Joffrey F 90c57f99e8 On load error, retry reading the file with UTF-8 encoding
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-27 12:37:21 -07:00
Joffrey F 7e787a8c15
Merge pull request #5822 from brainlock/fix-gh-5179
fix race condition in Service.create_container()
2018-03-27 09:24:40 -07:00
Alberto Piai 394c8efe98 fix race condition in Service.create_container()
The Service.create_container() method fetches a list of the current
containers in order to determine the next container number. In doing so,
it makes several API calls: one to fetch the list of containers, then
one per container in order to inspect it.

In some situations it can happen that a container is removed after
having been listed: in that case, the call to inspect will get a 404 and
raise a NotFound.

One situation in which this has been observed is when trying to
concurrently create multiple one-off containers for the same service
(using `docker-compose run` and a unique `--name`), as described in
more detail in gh-5179.

This patch adds a unit test that simulates the race between the
calls to list and to inspect, and changes Service._next_container_number
to skip removed containers instead of blowing up.

Fixes gh-5179

Signed-off-by: Alberto Piai <apiai@sensational.ch>
2018-03-27 10:21:15 +02:00
Joffrey F 771a1382bd
Merge pull request #5819 from docker/5433-build-zip
Add --compress option to build command
2018-03-27 00:52:06 +02:00
Joffrey F cbb9bff924 Support -H=host notation for interactive run/execs
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-26 14:25:31 -07:00
Joffrey F 255d16d7fa Add --compress option to build command
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-23 17:05:15 +01:00
Joffrey F 679d3555a2 1.21.0-dev
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-20 16:10:08 +01:00
Joffrey F f7aa4a619f Merge branch 'release'
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-20 16:08:34 +01:00
Joffrey F ca8d3c6c18 Bump 1.20.0
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-20 15:10:49 +01:00
Joffrey F fd94fab264 Manage encoding errors in progress_stream
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-20 14:55:23 +01:00
Joffrey F 876e1ba8d5
Merge pull request #5798 from mnottale/cpu-rt
Add support for cpu_rt_period and cpu_rt_runtime.
2018-03-19 06:51:25 -07:00
Joffrey F 6c7c7902f1
Merge pull request #5788 from mnottale/dash-underscore-in-project-name
Allow dash and underscore in project name.
2018-03-19 05:33:21 -07:00
Joffrey F 4a75fc7bbc
Merge pull request #5787 from mnottale/pull-parallel-by-default
Pull parallel by default
2018-03-19 05:19:32 -07:00
Matthieu Nottale 16ea49ac8c Add support for cpu_rt_period and cpu_rt_runtime.
Signed-off-by: Matthieu Nottale <matthieu.nottale@docker.com>
2018-03-19 13:18:35 +01:00
Joffrey F b1ade31c67 Manage encoding errors in progress_stream
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-15 17:10:36 -07:00
Matthieu Nottale 8336407830 pull: Deprecate '--parallel' and enable it by default.
Signed-off-by: Matthieu Nottale <matthieu.nottale@docker.com>
2018-03-15 15:47:29 +01:00
Matthieu Nottale c7b76b1d12 pull: Honor --quiet in parallel mode.
Signed-off-by: Matthieu Nottale <matthieu.nottale@docker.com>
2018-03-15 15:47:20 +01:00
Matthieu Nottale 5fe3aff1c3 Allow dash and underscore in project name.
Signed-off-by: Matthieu Nottale <matthieu.nottale@docker.com>
2018-03-15 15:44:43 +01:00
Joffrey F 0112c740ad Check volume config against remote and error out if diverged
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-12 17:19:03 -07:00
Joffrey F 8c4af54257 Bump 1.20.0-rc2
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-08 18:34:23 -08:00
Joffrey F ca012640c1 Preserve security_opt values in extends
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-08 18:29:22 -08:00
Matthieu Nottale d2b5d59dd8 Revamp ParallelStreamWriter to fix display issues.
Signed-off-by: Matthieu Nottale <matthieu.nottale@docker.com>
2018-03-08 18:29:17 -08:00
Matthieu Nottale d36f222c7e Fix a race condition in ParallelStreamWriter.
Signed-off-by: Matthieu Nottale <matthieu.nottale@docker.com>
2018-03-08 18:29:02 -08:00
Joffrey F 867ad1550b
Merge pull request #5769 from docker/5766-fix-secopt-extend
Preserve security_opt values in extends
2018-03-08 18:20:56 -08:00
Joffrey F 85670e208b
Merge pull request #5751 from mnottale/cpu_period
Add support for 'cpu_period' for compose v2.1-v2.3.
2018-03-08 18:12:59 -08:00
Joffrey F 7e3bbef436 Preserve security_opt values in extends
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-08 18:03:54 -08:00
Matthieu Nottale b9f9643d24 Add support for 'cpu_period' for compose v2.1-v2.3.
Signed-off-by: Matthieu Nottale <matthieu.nottale@docker.com>
2018-03-07 15:23:24 +01:00
Matthieu Nottale 31dcfcff2a Revamp ParallelStreamWriter to fix display issues.
Signed-off-by: Matthieu Nottale <matthieu.nottale@docker.com>
2018-03-07 15:22:38 +01:00
Joffrey F 38f7fdfe89
Merge pull request #5709 from mnottale/exec-workdir
Add '--workdir' option to 'exec'.
2018-03-02 15:28:07 -08:00
Matthieu Nottale 17610e8d19 Fix a race condition in ParallelStreamWriter.
Signed-off-by: Matthieu Nottale <matthieu.nottale@docker.com>
2018-03-01 17:09:01 +01:00
Joffrey F 86428af5bc Bump 1.20.0-rc1
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-27 14:44:21 -08:00
Joffrey F 4ceeaad089
Merge pull request #5725 from docker/geigerzaehler-run-with-network-alias
Add --use-aliases flag to run command
2018-02-27 14:01:09 -08:00
Joffrey F 07199fac37 Restore container ID alias
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-27 13:46:27 -08:00
Joffrey F 1096a903be unset entrypoint test
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-27 13:25:52 -08:00
Thomas Scholtes 5b6e02d13a 'run' command can use network aliases for service
It is now possible for the 'run' command to use the network aliases
defined for the service.

Fixes #3492

Signed-off-by: Thomas Scholtes <thomas-scholtes@gmx.de>
2018-02-27 13:13:50 -08:00
Ganesh Satpute 59c8ed77e4 Allow unset of entrypoint (resolves #5582)
When an empty string is passed to the 'entrypoint' parameter, for example
`docker-compose run --entrypoint='' ...`
OR
`docker-compose run --entrypoint '' ...`
It allows the default entrypoint to be overriden by empty value.

Signed-off-by: Ganesh Satpute <ghsatpute@gmail.com>
2018-02-27 13:02:05 -08:00
Joffrey F 9b2efd50f5
Merge pull request #5722 from docker/5700-call-docker-with-args
Re-use TLS and host options when shelling out to docker CLI
2018-02-27 12:27:49 -08:00
Joffrey F a7d1fada52 Unify toplevel command handlers
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-27 11:57:25 -08:00
Joffrey F 7ce5766f6a Re-use TLS and host options when shelling out to docker CLI
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-27 11:14:28 -08:00
Joffrey F 2578813147
Merge pull request #5706 from docker/5601-config-proxy
Use config file-provided proxy values to populate buildargs and env
2018-02-27 10:13:37 -08:00
Joffrey F a35335a75c Add support for device_cgroup_rules in v2.3 files
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-26 14:43:44 -08:00
Joffrey F a6c31b80fe Add support for seccomp files
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-26 10:46:10 -08:00
Joffrey F ec0de7eb68
Merge pull request #5684 from docker/compat_mode
Compatibility mode
2018-02-26 10:42:59 -08:00
Joffrey F 6659e99aff
Merge pull request #5703 from mnottale/log-level
New --log-level option.
2018-02-23 12:57:32 -08:00
Matthieu Nottale 2fed399881 Add '--workdir' option to 'exec'.
Signed-off-by: Matthieu Nottale <matthieu.nottale@docker.com>
2018-02-23 16:57:23 +01:00
Matthieu Nottale 59b08c7d1d New --log-level option.
Signed-off-by: Matthieu Nottale <matthieu.nottale@docker.com>
2018-02-23 13:14:26 +01:00
Matthieu Nottale 5eefa81f9e Add '--quiet' option to 'up' to pull silently.
Signed-off-by: Matthieu Nottale <matthieu.nottale@docker.com>
2018-02-23 11:03:26 +01:00
Joffrey F d4106679a6 Use configfile-provided proxy values to populate buildargs and env values
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-22 16:19:50 -08:00
Joffrey F 2fa201660c
Merge pull request #5699 from docker/pantuza-cli-add-detach-option
Add long-form --detach CLI flag
2018-02-22 12:52:28 -08:00
Joffrey F c6fe564ed5 Add --detach tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-21 16:42:49 -08:00