Catching the first container to exit Signed-off-by: Kevin Broadwater <kevin.broadwater@gmail.com>
Addressing feedback and fixing tests Signed-off-by: Kevin Broadwater <kevin.broadwater@gmail.com>
Adding break and removing extra fixture files Signed-off-by: Kevin Broadwater <kevin.broadwater@gmail.com>
Moving break Signed-off-by: Kevin Broadwater <kevin.broadwater@gmail.com>
- set flag name to `--exit-code-from` (and rename some variable,
function and test names to match)
- force cascade_stop to true when exit-code-from flag is set
- use lambda in filter statement
- check that selected container name is in the project before running
- remove fancy parsing of service name to container mappings: if there
are multiple containers in a service, return the first nonzero exit
value if any
- flake8 changes
Signed-off-by: Nathan J. Mehl <n@climate.com>
This commit allows `docker-compose` to access `top` for containers
much like running `docker top` directly on a given container.
This commit includes:
* `docker-compose` CLI changes to expose `top`
* Completions for `bash` and `zsh`
* Required testing for the new `top` command
Signed-off-by: Peter Urda <peter.urda@gmail.com>
The CLI would show an unhandled exception when running:
$ docker-compose help foobar
Now, it lists the commands.
Signed-off-by: Danny Guo <dannyguo91@gmail.com>
Named volumes will not be removed.
This is consistent with the behavior of docker run --rm.
Fixes#2419, #3611
Signed-off-by: Nikola Kovacs <nikola.kovacs@gmail.com>
self._project.client is a docker.client.Client, so creating a new self._project
leaks (via the embedded connection pool) a bunch of Unix socket file
descriptors for each test which overrides self.project using this mechanism.
In my tests I observed the test harness using 800-900 file descriptor, which is
OK on Linux with the default limit of 1024 but breaks on OSX (e.g. with
Docker4Mac) where the default limit is only 256. The failure can be provoked on
Linux too with `ulimit -n 256`.
With this fix I have observed the process ending with ~100 file descriptors
open, including 83 Unix sockets, so I think there is likely at least one more
leak lurking.
Signed-off-by: Ian Campbell <ian.campbell@docker.com>
- When no command is passed but `--entrypoint` is, set Cmd to `[]`
- When command is a single empty string, set Cmd to `[""]`
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
Unset env vars passed to `run` via command line options take the
value of the system's var with the same name.
Signed-off-by: Joffrey F <joffrey@docker.com>
CLITestCase.test_events_human_readable fails due to
wrong assumption that host where tests were launched
will have the same date time as Docker daemon.
This fix introduces internal method for validating
timestamp in Docker logs
Signed-off-by: Denys Makogon <lildee1991@gmail.com>