Commit Graph

88 Commits

Author SHA1 Message Date
Ulysses Souza 47d170b06a Fix race condition on watch_events
Avoid to attach to restarting containers and ignore
race conditions when trying to attach to already
dead containers

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-09-04 17:55:05 +02:00
Ulysses Souza c641ea08ae Fix stdin_open when running docker-compose run
This fix makes sure that stdin_open specified in the service
is considering when shelling out to the CLI

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-07-22 17:27:10 +02:00
Djordje Lukic 98932e9cb4
Merge pull request #6754 from Goryudyuma/6740-fix-display
fix: The correct number is displayed
2019-07-15 10:30:59 +02:00
Goryudyuma 59491c7d77
add: test for units
Signed-off-by: Kei Matsumoto <umaretekyoumade@gmail.com>
2019-07-14 04:31:16 +09:00
Kei Matsumoto 75d41edb94
fix: Add test
Signed-off-by: Kei Matsumoto <umaretekyoumade@gmail.com>
2019-07-14 03:38:29 +09:00
Ian Campbell 9d2508cf58 Pass environment when calling through to docker cli.
This ensures that settings from any `.env` file (such as `DOCKER_HOST`) are
passed on to the cli.

Unit tests are adjusted for the new parameter and a new case is added to ensure
it is propagated as expected.

Fixes: 6661

Signed-off-by: Ian Campbell <ijc@docker.com>
2019-05-23 16:29:46 +01:00
Inconnu08 99e67d0c06 fix warning method is deprecated with tests
Signed-off-by: Taufiq Rahman <taufiqrx8@gmail.com>
2019-05-15 23:46:12 +06:00
Ulysses Souza c8a621b637 Fix Flake8 lint
This removes extra indentation and replace the use of `is` by `==` when
comparing strings

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-02-05 11:11:52 +01:00
Joffrey F 4368b8ac05 Only use supported protocols when starting engine CLI subprocess
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-10-24 16:08:56 -07: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 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 a6c31b80fe Add support for seccomp files
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-26 10:46:10 -08:00
Joffrey F cd7ccad81e Retrieve certs from default path if not provided explicitly
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-21 13:33:27 -08:00
Joffrey F a0f78539b6 Test and build on 3.6 (replaces 3.4) ; dist 3.6-compiled binaries
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-01 16:05:32 -08:00
Joffrey F 4d4e066fbc Fix DOCKER_TLS_VERIFY bug
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-01 12:16:32 -08:00
Joffrey F fd1e8024f7
Merge pull request #5593 from docker/4651-tls-env-and-flags
Support mixed use of TLS flags and TLS environment variables
2018-01-22 11:01:44 -08:00
Joffrey F 593a675d2b Support mixed use of TLS flags and TLS environment variables
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-19 15:48:30 -08:00
Joffrey F 9ba9016cbc Improve ImageNotFound handling in convergence
- Improved CLI prompt
- Attempt volume preservation with new image config
- Fix container.rename_to_tmp_name()
- Integration test replicates behavior ; remove obsolete unit test

Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-19 14:16:57 -08:00
Joffrey F 1b39817172
Merge pull request #5531 from docker/5505-required-variables
Support ${VAR:?err} syntax for mandatory variables
2018-01-08 13:38:15 -08:00
Joffrey F e400c05de0 Support ${VAR:?err} syntax for mandatory variables
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-05 16:46:09 -08:00
Joffrey F b13ec16e11 Replace unittest-style asserts with pytest asserts
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-04 14:38:28 -08:00
Joffrey F d0644bdff8 Handle non-ascii characters in npipe error handler
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-08 14:16:14 -08:00
Joffrey F d2cbf33412 Add specific handling for pywintypes.error
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-10-16 13:43:57 -07:00
Joffrey F 0f00aa4098 Convert paths to unicode in get_config_path_from_options if needed
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-04-10 17:45:06 -07:00
Joffrey F f55c9d4201 Recognize COMPOSE_TLS_VERSION env var in tls_config_from_options
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-22 17:27:11 -07:00
Joffrey F dd294ce9cc Merge pull request #4591 from shin-/4580-log-api-error
Avoid encoding crash in log_api_error
2017-03-10 14:02:44 -08:00
Joffrey F c3bcd59aeb Avoid encoding crash in log_api_error
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-09 15:23:13 -08:00
Joffrey F ac12ab95c4 Rename COMPOSE_FILE_SEPARATOR -> COMPOSE_PATH_SEPARATOR
Add unit test

Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-08 14:30:15 -08:00
kbroadwater 6c3641fdb7 Returing 1 when a container exits with a non-zero exit code with --abort-on-container-exit is set. Signed-off-by: Kevin Broadwater <kevin.broadwater@gmail.com>
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>
2017-03-01 17:08:26 -08:00
Joffrey F d2fb146913 Replace "which" calls with the portable find_executable function
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-24 13:22:52 -07:00
Joffrey F 9248298a4a Merge pull request #4016 from shin-/4008-unicode-formatter
Handle formatter case where logrecord message is binary containing unicode
2016-10-06 16:49:03 -07:00
Joffrey F 17c5b45641 Handle formatter case where logrecord message is binary containing
unicode characters.

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-06 15:39:47 -07:00
Joffrey F 007cf96452 Use docker-py's default behavior when no explicit host on Windows
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-28 15:36:57 -07:00
Joffrey F 64517e31fc Force default host on windows to the default TCP host (instead of npipe)
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-16 11:43:25 -07:00
Joffrey F 651283eef9 Merge pull request #3941 from shin-/3888-recover-apierror-logs
Catch APIError while printing container logs
2016-09-13 12:58:40 -07:00
Joffrey F 3fcd648ba2 Catch APIError while printing container logs
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-13 12:10:41 -07:00
Aanand Prasad 9759f27fa6 Fix integration test on Docker for Mac
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-09-13 14:50:37 +01:00
Joffrey F c0305024f5 Remove surrounding quotes from TLS paths, if present
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-08-09 15:13:01 -07:00
Aanand Prasad 5aeeecb6f2 Fix stacktrace when handling timeout error
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-29 17:12:46 +01:00
Ben Firshman 1877a41b92
Add user agent to API calls
Signed-off-by: Ben Firshman <ben@firshman.co.uk>
2016-07-27 14:26:15 +01:00
Aanand Prasad 4207d43b85 Fix timeout value in error message
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-07 12:08:47 -07:00
Joffrey F ee68a51e28 Skip TLS version test if TLSv1_2 is not available on platform
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-06-14 12:23:04 -07:00
Joffrey F e7a8b2fed5 Update TLS version configuration code. Tests.
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-06-03 11:45:22 -07:00
Joffrey F d27b82207c Remove obsolete assert_hostname tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-30 10:58:15 -07:00
Joffrey F 7116aefe43 Fix assert_hostname logic in tls_config_from_options
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-28 17:39:20 -07:00
Joffrey F b99037b4a6 Add support for DOCKER_* variables in .env file
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:28 -07:00
Joffrey F 36f1b4589c Limit occurrences of creating an environment object.
.env file is always read from the project_dir

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -07:00
Joffrey F fd020ed2cf Tests use updated get_config_paths_from_options signature
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-24 10:57:01 -07:00
Joffrey F 2cc87555cb tls_config_from_options unit tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-03-22 11:57:45 -07:00
Thomas Grainger 20bf05a6e3 Fix TypeError in Exception handling
Traceback (most recent call last):
  File "/tmp/tmp.02tgGaAGtW/docker-compose/bin/docker-compose", line 11, in <module>
    sys.exit(main())
  File "/tmp/tmp.02tgGaAGtW/docker-compose/lib/python3.4/site-packages/compose/cli/main.py", line 68, in main
    log_api_error(e)
  File "/tmp/tmp.02tgGaAGtW/docker-compose/lib/python3.4/site-packages/compose/cli/main.py", line 89, in log_api_error
    if 'client is newer than server' in e.explanation:
TypeError: 'str' does not support the buffer interface

Signed-off-by: Thomas Grainger <tagrain@gmail.com>
2016-03-17 15:13:01 +00:00