Commit Graph

1197 Commits

Author SHA1 Message Date
Joffrey F 843a0d82a0 Add support for IPAM options in v2 format
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-04-10 12:24:05 -07:00
Joffrey F cc966a7e19 Add support for init and init_path
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-04-10 12:16:57 -07:00
Joffrey F 72a2ea9d86 Fix serializer bug (python 3)
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-04-07 16:54:31 -07:00
Joffrey F 2506b72508 Merge pull request #4649 from shin-/bump_docker_py
Bump docker SDK dependency
2017-03-31 14:40:49 -07:00
Joffrey F 48831a8d5f Bump docker SDK dependency
Update invalid ports test

Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-28 16:15:34 -07:00
King Chung Huang 0e5acfa16c Merge deploy key in service dicts
Update merge_service_dicts() to merge deploy mappings.
Compose file version 3 added the deploy key to service dicts
to specify configs related to Docker services.

Signed-off-by: King Chung Huang <kinghuang@mac.com>
2017-03-24 15:03:53 -06:00
Joffrey F eab1ee0eaf Support 'nocopy' mode for expanded volume syntax
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-23 15:17:23 -07:00
Joffrey F 0d1608c17c Merge pull request #4662 from shin-/4651-tls-version-commandline
Recognize COMPOSE_TLS_VERSION env var in tls_config_from_options
2017-03-23 15:16:03 -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 a0add5cc12 Fix ports reparsing for service extends
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-22 15:14:13 -07:00
Joffrey F 732bf52a4e The interval is too damn small
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-22 14:09:50 -07:00
Joffrey F 611f058cde Merge pull request #4632 from shin-/expanded-mounts
Add support for expanded mount/volume notation
2017-03-21 12:36:41 -07:00
Joffrey F 69d0c0e3a0 Add support for expanded mount/volume notation
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-17 20:42:59 -07:00
King Chung Huang 0464476f08 Add unit test for image digests in config
Add two unit tests to validate that the denormalize_service_dict
function still works without passing a third argument for image_digest,
and correctly uses an image digest if one is provided.

Signed-off-by: King Chung Huang <kinghuang@mac.com>
2017-03-17 12:22:40 -06:00
Daniel Nephin 2acf286ed6 Support V3.2
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-03-15 11:40:31 -04:00
Joffrey F a182300706 Merge pull request #4605 from shin-/4600-check-all-network-updates
Ensure network config matches remote for all properties
2017-03-14 13:56:43 -07:00
Joffrey F a6db78e5d4 Enable variable substitution in config.secrets
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-13 18:30:37 -07:00
Joffrey F 963b672cbd Ensure network config matches remote for all properties
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-13 15:48:38 -07:00
Joffrey F 23b873c2ce Add "secrets" section to docker-compose config output when applicable
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-10 14:32:55 -08: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 beedceb66b Merge pull request #4589 from shin-/dbonev-2586-specify-cwd-parameter
Ability to change working directory via a CLI flag
2017-03-09 15:44:27 -08:00
Joffrey F 4e92b5bb85 Merge pull request #4590 from shin-/3474-self-referencing-ext-links
Prevent service to create a container if it is referencing itself in an external link
2017-03-09 15:36:48 -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 5ea9167334 Prevent service to create a container if it is referencing itself in an external link
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-08 18:29:09 -08:00
Dimitar Bonev 707210ae95 Ability to change working directory via a CLI flag
Signed-off-by: Dimitar Bonev <dimitar.bonev@gmail.com>
2017-03-08 14:42:14 -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
Joffrey F d5a2d37d05 Properly resolve build args against host environment values
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-07 18:13:11 -08:00
Dat Tran 449dcc9d7b support --build-arg for build command
Signed-off-by: Dat Tran <dattran.vn01@gmail.com>
2017-03-07 17:09:35 -08:00
Joffrey F dd4e49ef98 Merge pull request #4563 from shin-/3723-mem-reservation
Add mem_reservation option to service config in 2.0 and 2.1 formats
2017-03-07 15:23:22 -08:00
Joffrey F e344fe9a9f Merge pull request #4566 from shin-/eddwardo-run-v
Add --volumes flag to docker-compose run
2017-03-07 15:22:51 -08:00
Joffrey F 01fa147183 Merge pull request #4040 from rawkode/feature/allow-running-containers-to-be-deleted
Allowing running containers to be rm'd by stop flag
2017-03-06 18:34:19 -08:00
Joffrey F 0167aba2b7 Merge pull request #4541 from shin-/4502-expanded-port-syntax
Add support for expanded port syntax in 3.1 format
2017-03-06 18:32:52 -08:00
Joffrey F d75726db21 Merge pull request #4561 from shin-/JesusTinoco-3501-add-image-command-option
Add images command
2017-03-06 18:28:34 -08:00
Joffrey F 4dca6adeb1 Merge pull request #4562 from shin-/lindt-bugfix/unnamed_volumes_do_not_support_mode_suffix
Do not add mode to anonymous volumes in config output
2017-03-06 18:21:36 -08:00
Joffrey F ec252350ae Add mem_reservation option to service config in 2.0 and 2.1 formats
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-06 18:21:03 -08:00
Joffrey F bf7c2bc0f8 Use create_host_file in run -v tests to ensure file availability
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-06 18:13:16 -08:00
Joffrey F b454268f93 Merge pull request #4565 from shin-/onorua-pids-limit
Add pids_limit to service config
2017-03-06 18:09:53 -08:00
Joffrey F 8f8678987b Improve readability of code and output for the images command
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-06 15:56:41 -08:00
Joffrey F 83728d2bcc Do not add mode in volume representation if it's not a host binding
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-06 14:43:29 -08:00
Joffrey F b6fb3f2634 pids_limit not yet supported for swarm services - removing from v3 format
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-06 14:32:04 -08:00
Joffrey F 7512dccaa8 Add dns_opt to 2.1 schema
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-06 13:28:52 -08:00
George Lester c7b8278e78 Implemented dns_opt
Signed-off-by: George Lester <glester491@gmail.com>
2017-03-03 15:37:21 -08:00
Piotr Szymanski 83388ec31a enable -v flag for docker-compose run command
Give user ability to attach volumes while running containers with
docker-compose run command. Example is given in the test implementation,
command is compatible with the one provided by docker engine.

Signed-off-by: Piotr Szymanski <skyleton@gmail.com>
2017-03-02 16:50:24 -08:00
Yaroslav Molochko 6a151aac04 introducing pids_limit, fix for #4178
Signed-off-by: Yaroslav Molochko <y.molochko@anchorfree.com>
2017-03-02 16:44:26 -08:00
stefan 11329e779b added failing test that ensures that named volume will not be printed with a mode suffix
Signed-off-by: stefan <think@hotmail.de>
2017-03-02 15:26:40 -08:00
Jesus Tinoco 90beeaf21c 3501 - Remove a test and fix other
Signed-off-by: Jesus Rodriguez Tinoco <jesus.rodriguez.tinoco@gmail.com>
2017-03-02 15:00:55 -08:00
Jesus Tinoco 33f510b340 3501 - Add a new command option (images)
Signed-off-by: Jesus Rodriguez Tinoco <jesus.rodriguez.tinoco@gmail.com>
2017-03-02 15:00:55 -08:00
Joffrey F 6986a994a8 Merge branch 'forward-exit' of https://github.com/TheClimateCorporation/compose into TheClimateCorporation-forward-exit
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-01 18:04:48 -08:00
Joffrey F b4f4ff1a6b Merge pull request #4555 from kbh2o/abort_abort
Return exit code when exiting with --abort-on-container-exit
2017-03-01 17:51:58 -08:00
Joffrey F 8d3c8be7d9 Merge pull request #4036 from nbarbey/master
Fix TypeError : unorderable types: str() < int()
2017-03-01 17:25:21 -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 1a77a7fd44 Merge pull request #3756 from nkovacs/2419-run-rm-volumes
Remove anonymous volumes when using run --rm.
2017-03-01 16:38:46 -08:00
Joffrey F eca3146c9c Merge pull request #3617 from dguo/help-nonexistent-command
Handle giving help a nonexistent command
2017-03-01 16:31:37 -08:00
Joffrey F 9f8e01fa94 Merge pull request #3543 from milin/master
Replace assertEquals with assertEqual in unittests since the former is getting dep…
2017-03-01 16:27:36 -08:00
Joffrey F 9e90b6e645 Merge pull request #4553 from edsrzf/config-volumes
Add --volumes flag to config command
2017-03-01 14:54:46 -08:00
Joffrey F 5ff3037aa8 Merge pull request #4428 from edsrzf/parallel-pull
Pull services in parallel
2017-03-01 14:38:22 -08:00
Evan Shaw d67261f26e Add --volumes flag to config command
Closes #3609

Signed-off-by: Evan Shaw <evan@vendhq.com>
2017-03-02 10:03:31 +13:00
Joffrey F 11788ef0ff Add support for expanded port syntax in 3.1 format
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-03-01 12:10:51 -08:00
David McKay 1f9fb27456 Allowing running containers to be rm'd by stop flag
Signed-off-by: David McKay <david@rawkode.com>
2017-03-01 10:33:23 +00:00
Nathan J. Mehl cffb76d4d9 Address comments
- 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>
2017-02-27 09:51:03 -08:00
Nathan J. Mehl a73190e1cc Add support for returning the exit value of a specific container
Current best practice for using docker-compose as a tool for continuous
integration requires fragile shell pipelines to query the exit status
of composed containers, e.g.:

http://stackoverflow.com/questions/29568352/using-docker-compose-with-ci-how-to-deal-with-exit-codes-and-daemonized-linked
http://blog.ministryofprogramming.com/docker-compose-and-exit-codes/

This PR adds a `--forward-exitval <container>` flag that allows
`docker-compose up` to return the exit value of a specified container.
The container may optionally have a number specified (foo_2) otherwise
the first is defaulted to.

Signed-off-by: Nathan J. Mehl <n@climate.com>
2017-02-27 08:37:11 -08:00
Joffrey F 7e8dcc847b Merge pull request #4529 from shin-/3528-invalid-service-name
Detect the service that causes the invalid service name error
2017-02-24 17:47:41 -08:00
Evan Shaw e29e3f8da4 Test for parallel_execute with limit
Signed-off-by: Evan Shaw <evan@vendhq.com>
2017-02-25 13:14:58 +13:00
Evan Shaw 05aa8c7285 Add optional limit to the number of parallel operations
Signed-off-by: Evan Shaw <evan@vendhq.com>
2017-02-24 21:53:38 +13:00
Joffrey F 8b92049432 Detect the service that causes the invalid service name error
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-02-22 16:21:23 -08:00
Joey Payne c64f7dde04 Fix failing unit tests
Signed-off-by: Joey Payne <jyapayne@gmail.com>
2017-02-21 19:01:30 -07:00
Joey Payne 33fcfca040 Add test for cache_from
Signed-off-by: Joey Payne <jyapayne@gmail.com>
2017-02-21 19:01:30 -07:00
Aaron.L.Xu d20e3f3342 function-name-modification for tests/*
Signed-off-by: Aaron.L.Xu <likexu@harmonycloud.cn>
2017-02-16 15:25:20 +08:00
Joffrey F abce83ef25 Fix `config` command output with service.secrets section
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-02-13 16:51:50 -08:00
Daniel Nephin dc5b3f3b3e Fix secrets config.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-02-10 17:11:24 -05:00
Daniel Nephin c092fa37de Fix version 3.1
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-02-09 12:39:57 -05:00
Joffrey F 951497c0f2 Merge pull request #4419 from shin-/4418-healthcheck-extends
Don't re-parse healthcheck values coming from extended services
2017-02-03 12:24:53 -08:00
Joffrey F e22164ec9f Merge pull request #4035 from urda/urda/compose-top
Added `top` to `docker-compose` to display running processes
2017-02-02 15:41:14 -08:00
Joffrey F cf43e6edf7 Don't re-parse healthcheck values coming from extended services
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-02-02 14:50:53 -08:00
Joffrey F 7e8958e6ca Add missing comma in DOCKER_CONFIG_KEYS list
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-02-01 16:40:43 -08:00
Peter Urda a67500ee57
Added `top` to `docker-compose` to display running processes.
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>
2017-02-01 15:42:30 -08:00
Daniel Nephin 59d1847d9b Fix some test failures.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-31 09:53:40 -05:00
Daniel Nephin 4053adc7d3 Add an integration test for secrets using bind mounts.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-31 09:53:16 -05:00
Daniel Nephin e0c6397999 Implement secrets using bind mounts
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2017-01-31 09:53:16 -05:00
Joffrey F e10d1140b9 Convert time data back to string values when serializing config
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-26 11:59:22 -08:00
Joffrey F 9a0962dacb Merge pull request #4361 from shin-/4348-serialize-ext-volumes
Remove external_name from volume def in config output
2017-01-19 17:41:08 -08:00
Joffrey F d83d31889e Remove external_name from volume def in config output
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-19 16:05:13 -08:00
Joffrey F 5c2165eaaf Fix volume definition in v3 schema
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-19 15:41:31 -08:00
Joffrey F 1a02121ab5 depends_on merge now retains condition information when present
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-18 17:52:03 -08:00
Joffrey F 56a1b02aac Catch healthcheck exceptions in parallel_execute
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-17 13:22:16 -08:00
Joffrey F 2df31bb13c Provide valid serialization of depends_on when format is not 2.1
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-11 16:25:40 -08:00
Joffrey F 534b4ed820 Falsy values in COMPOSE_CONVERT_WINDOWS_PATHS are properly recognized
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-04 15:45:11 -08:00
Joffrey F 8145429399 Unify healthcheck spec definition in v2 and v3
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-04 13:14:23 -08:00
Joffrey F bef2308530 Fix condition name in config tests
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-04 11:28:30 -08:00
Joffrey F 04394b1d0a Expand depends_on to allow different conditions (service_start, service_healthy)
Rework "up" and "start" to wait on conditional state of dependent services
Add integration tests

Signed-off-by: Joffrey F <joffrey@docker.com>
2017-01-04 11:28:30 -08:00
Joffrey F ba47fb99ba Add default labels to networks and volumes created by Compose
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-19 20:43:35 -08:00
Joffrey F e6b2949edc Merge pull request #4216 from lawliet89/userns_mode
Implement `userns_mode` HostConfig for services
2016-12-19 18:12:15 -08:00
Joffrey F fb165d9c15 Add v3_only marker to healthcheck test
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-16 12:21:59 -08:00
Joffrey F 04e5925a23 Use docker SDK 2.0
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-12-14 15:36:08 -08:00
Joffrey F 635a281777 Merge pull request #4163 from aanand/add-healthcheck
Implement 'healthcheck' option
2016-12-14 15:35:05 -08:00
Daniel Nephin e04a12b5ca Increase minimum version for v3.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-12-07 11:16:40 -05:00
Yong Wen Chua 62f8b1402e Implement `userns_mode` HostConfig for services
Fixes #3349

This allows the key `userns_mode` to be used in service definitions.
Since `userns_mode` requires API version > 1.23, this is only available
in 2.1 and 3.0 versions of compose file

Signed-off-by: Yong Wen Chua <me@yongwen.xyz>
2016-12-05 14:25:56 +08:00
Danny Guo fbcc1510cc Handle giving help a nonexistent command
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>
2016-12-03 14:58:15 -05:00
Aanand Prasad 716a6baa59 Implement 'healthcheck' option
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-18 14:47:02 +00:00
Daniel Nephin 079c95c340 Use stop grace period for container stop.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-16 12:12:28 -05:00
Daniel Nephin 6cac48c056 Add a vendored and modified pytimeparse
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-11-16 12:10:32 -05:00
Aanand Prasad d717c88b6e Support version 3.0 of the Compose file format
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-16 16:07:02 +00:00
Joffrey F 721bf89447 Merge pull request #4134 from shin-/fix_none_opts_network_check
Avoid breaking when remote driver options are null
2016-11-15 15:01:24 -08:00
Joffrey F 09540339e0 Merge pull request #4131 from aanand/test-environment-overrides-env-file
Test that values in 'environment' override env files
2016-11-15 14:18:54 -08:00
Joffrey F 7f60ff5ae6 Avoid breaking when remote driver options are null.
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-11-15 12:00:52 -08:00
Joffrey F efb4ed1b9e Handle new pull failures behavior in Engine 1.13
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-11-15 11:30:52 -08:00
Aanand Prasad ba249e5179 Test that values in 'environment' override env files
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-11-09 15:10:27 +00:00
Joffrey F 10417eebd7 Fix logging dict merging
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-11-03 17:22:31 -07:00
Joffrey F ba43d08fbd Add whitelisted driver option added by the overlay driver to avoid breakage
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-11-01 11:47:12 -07:00
Aanand Prasad 8b5782ba9f Merge pull request #4067 from shin-/portable-find-exe
Replace "which" calls with the portable find_executable function
2016-10-24 16:15:21 -07:00
Joffrey F 60d005b055 Improve robustness of a couple integration tests with occasional failures
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-24 13:58:45 -07: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 efb09af271 Do not normalize volume paths on Windows by default
Add environment variable to enable normalization if needed.
Do not normalize internal paths

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-18 12:17:56 -07:00
Nicolas Barbey 086ae04b9e Fix TypeError : unorderable types: str() < int()
While merging list items into a set, strings and ints are compared which is not possible.
We cast everything to strings to avoid the issue.

The issue was seen with python 3.5 while overriding configuration files
with heterogenous port types (int in one file, string in another).

Signed-off-by: Nicolas Barbey <nicolas.a.barbey@gmail.com>
2016-10-18 12:01:00 +02:00
Joffrey F 14716bc2da Merge branch 'master' of https://github.com/dbdd4us/compose into dbdd4us-master 2016-10-17 14:09:09 -07:00
Joffrey F a5c1e4b0cd Merge pull request #3991 from shin-/3906-isolation-config
Add support for "isolation" in config
2016-10-17 11:02:11 -07:00
Joffrey F 95c6cc0420 Merge pull request #3994 from shin-/3430-enable-ipv6
Add support for enable_ipv6 in network definition.
2016-10-17 11:02:00 -07:00
realityone 22d91f60be
fix serialize restart spec with null string
Signed-off-by: realityone <realityone@me.com>
2016-10-14 18:20:55 +08:00
dbdd bdcce13f4a add support for creating volume and network with label definition
Signed-off-by: dbdd <wangtong2712@gmail.com>
2016-10-12 10:35:14 +08:00
Joffrey F e4bb9bde30 Merge pull request #3964 from shin-/3963-unicode-env
Don't break when interpolating environment with unicode characters
2016-10-11 12:00:36 -07:00
Joffrey F 7f1606545d Merge pull request #4004 from shin-/4000-extend-logging
Properly merge logging dictionaries in overriding configs
2016-10-11 12:00:06 -07:00
Joffrey F 0603b445e2 Properly merge logging dictionaries in overriding configs
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-10 15:39:05 -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 bc3ed6dead Merge pull request #3992 from shin-/3701-npipe-windows-default
Use docker-py's default behavior when no explicit host on Windows
2016-10-06 16:48:35 -07:00
Joffrey F e5ded6ff9b Add support for enable_ipv6 in network definition.
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-10-06 15:49:08 -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
Daniel Nephin 2bce81508e Support non-alphanumeric default values.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-10-06 17:04:19 -04:00
Daniel Nephin fe08be698d Support inline default values.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-09-29 12:46:11 -04: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 dc8a39f70d Add support for "isolation" in config
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-28 15:31:58 -07:00
Joffrey F f65f89ad8c Merge pull request #3653 from shin-/3637-link-local-ips
Add support for link-local IPs in service.networks definition
2016-09-22 11:58:29 -07:00
Joffrey F 53fa44c01e Don't break when interpolating environment with unicode characters
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-20 18:05:59 -07:00
Joffrey F 7687412e03 Merge pull request #3922 from shin-/3897-volumespec_parse_win32
Improve volumespec parsing on windows platforms
2016-09-20 13:09:37 -07:00
Joffrey F 33424189d4 Denormalize function defaults to latest version
Minor docs fix

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-20 11:47:14 -07:00
Joffrey F 7911659266 Improve volumespec parsing on windows platforms
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-20 11:24:24 -07:00
Joffrey F 1648a3e257 Merge pull request #3709 from Knetic/groupadd
Supported group_add
2016-09-19 17:18:06 -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 66b395d950 Include docker-py link-local fix and improve integration test
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-15 14:55:42 -07:00
Joffrey F fd254caa68 Add support for link-local IPs in service.networks definition
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-15 14:55:14 -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 f065ce0f73 Merge pull request #3942 from shin-/3873-syslog-logs-error
Only allow log streaming if logdriver is json-file
2016-09-13 12:28:27 -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
Joffrey F 7dd2e33057 Only allow log streaming if logdriver is json-file or journald
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-09-13 11:56:26 -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
George Lester dada36f732 Supported group_add
Signed-off-by: George Lester <glester491@gmail.com>
2016-09-11 23:10:49 -07:00
Joffrey F 3dec600d82 Merge pull request #3830 from shin-/3534-machine-config-args
Remove surrounding quotes from TLS paths, if present
2016-09-07 18:35:43 -07:00
Joffrey F 267a243f80 Merge pull request #3799 from aanand/handle-connection-error-on-project-init
Handle connection errors on project initialization
2016-09-06 10:25:48 -07:00
Jean-François Roche d824cb9b06 Add support for swappiness constraint
Run a service using `docker run --memory-swappiness=0` (see
https://docs.docker.com/engine/reference/run/)

refs #2383

Signed-off-by: Jean-François Roche <jfroche@affinitic.be>
2016-08-16 11:02:51 +02: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 d29f8e1022 Merge pull request #3789 from shin-/3788-json-splitter-fix
json_splitter: Don't break when buffer contains leading whitespace.
2016-08-03 13:23:52 +01:00
Aanand Prasad b3a4d76d4f Handle connection errors on project initialization
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-08-02 11:44:25 +01:00
Joffrey F 6f4be1cffc json_splitter: Don't break when buffer contains leading whitespace.
Add error logging with detailed output for decode errors

Signed-off-by: Joffrey F <joffrey@docker.com>
2016-07-29 14:05:59 -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
Aanand Prasad e9d62e8404 Merge pull request #3676 from aanand/warn-for-swarm-mode
Show a warning when engine is in swarm mode
2016-07-27 15:38:09 +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 887ed8d1b6 Rename --fetch-digests to --push-images and remove auto-pull
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-25 17:36:24 +01:00
Aanand Prasad 2c9e46f60f Show a warning when engine is in swarm mode
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-25 13:46:56 +01:00
Nikola Kovacs 958758ff6d Remove anonymous volumes when using run --rm.
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>
2016-07-25 11:43:30 +02:00
Daniel Nephin 619bf4c4df Merge pull request #3705 from aanand/fix-timeout-message
Fix timeout value in error message
2016-07-22 10:57:41 -04:00
Daniel Nephin 10749e187c Merge pull request #3718 from aanand/fix-run-entrypoint
Fix bugs with entrypoint/command in docker-compose run
2016-07-22 10:55:25 -04:00
Ian Campbell d6f70dddc7 Call the superclass tearDown in VolumeTest
Currently it doesn't actually seem to make any practical difference that this
is missing, but it seems like good practice to do so anyway, to be robust
against future test case changes which might require cleanup done in the super
class.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-07-21 13:17:53 +01:00
Ian Campbell 3124fec01a tearDown tmp_volumes array itself in VolumeTest
Each volume in the array holds a reference to a docker.client.Client object and
therefore a connection pool which leaves fds open once the test has completed.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-07-21 13:17:53 +01:00
Ian Campbell 5cdf30fc12 Teardown project and db in ResilienceTest
These hold a reference to a docker.client.Client object and therefore a
connection pool which leaves fds open once the test has completed.

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-07-21 13:17:53 +01:00
Ian Campbell 0483bcb472 delete DockerClientTestCase.client class attribute on tearDownClass
This is a docker.client.Client and therefore contains a connection pool, so
each subclass of DockerClientTestCase can end up holding on to up to 10 Unix
socket file descriptors after the tests contained in the sub-class are
complete.

Before this by the end of a test run I was seeing ~100 open file descriptors,
~80 of which were Unix domain sockets. By cleaning these up only 15 Unix
sockets remain at the end (out of ~25 fds, the rest of which are the Python
interpretter, opened libraries etc).

Signed-off-by: Ian Campbell <ian.campbell@docker.com>
2016-07-20 15:51:22 +01:00
Ian Campbell 6649e9aba3 tearDown the project override at the end of each test case
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>
2016-07-20 14:34:12 +01:00
Aanand Prasad d7db15ce94 Merge pull request #3364 from TomasTomecek/3355-detailed-error-messages
service: detailed error messages for create and start
2016-07-11 16:29:35 -04:00
Aanand Prasad 593d1aeb09 Fix bugs with entrypoint/command in docker-compose run
- 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>
2016-07-11 16:15:13 -04:00
Jonathan Giannuzzi 83f35e132b Add support for creating internal networks
Signed-off-by: Jonathan Giannuzzi <jonathan@giannuzzi.be>
2016-07-11 11:34:01 +02:00
Tomas Tomecek fea970dff3 service: detailed error messages for create and start
Fixes: #3355

Signed-off-by: Tomas Tomecek <ttomecek@redhat.com>
2016-07-11 10:45:27 +02: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
Aanand Prasad 1e176b58c5 Merge pull request #3592 from stakodiak/fix-privilege-typo
Fix a typo in a test's name.
2016-07-06 15:22:05 -07:00
Aanand Prasad 554dc2496a Merge pull request #3590 from Knetic/oomscore
Added support for oom_score_adj
2016-07-06 11:45:09 -07:00
Aanand Prasad 949b88fff9 Fix alias tests on 1.11
The fix in 8e04582052 caused a regression
when testing against 1.11.

Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-07-06 09:56:25 -07:00
George Lester 6fe5d2b543 Implemented oom_score_adj
Signed-off-by: George Lester <glester491@gmail.com>
2016-07-05 23:43:32 -07:00
Aanand Prasad 50d5aab8ad Fix test: check container's Env array instead of the output of 'env'
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-06-30 17:00:30 -07:00
Joffrey F 5d244ef6d8 Unset env vars behavior in 'run' mirroring engine
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>
2016-06-30 15:48:23 -07:00
Aanand Prasad 72d3d5d84b Merge pull request #3612 from dnephin/tests_for_bundle
Add some unit tests and an acceptance test for bundle
2016-06-28 14:47:29 -07:00
Daniel Nephin 5640bd42a8 Add an acceptance test for bundle.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-06-28 10:18:59 -04:00
Daniel Nephin 95207561bb Add some unit tests for new bundle and push commands.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
2016-06-28 10:18:20 -04:00
Aanand Prasad 8e04582052 Fix tests to accommodate short-id container alias
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
2016-06-27 16:21:19 -07:00
Jonathan Giannuzzi 3c77db709f Fix assertion that was always true
Signed-off-by: Jonathan Giannuzzi <jonathan@giannuzzi.be>
2016-06-20 14:48:45 +02: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
Aanand Prasad 8f8c17bf66 Merge pull request #3549 from shin-/KalleDK-master
Add support for COMPOSE_TLS_VERSION config option
2016-06-14 10:57:12 -07:00
Aanand Prasad 21f20cbc9b Merge pull request #3449 from Andrey9kin/ready/3281
Fix #3281: Unexpected result when using build args with default values
2016-06-14 08:05:07 -07:00
alex 68d73183eb Fix a typo in a test's name. 2016-06-13 23:36:34 -04:00
Joffrey F 60f7e021ad Fix split_path_mapping behavior when mounting "/"
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-06-13 15:32:10 -07:00
Aanand Prasad e502417df2 Merge pull request #3475 from shin-/3429-networks-config-serialize
Output valid config in config command
2016-06-07 18:01:39 +02:00
Joffrey F ea640f3821 Remove external_name from serialized config output
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-06-03 12:10:09 -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
Milind Shakya 11a2eab549 Replace assertEquals with assertEqual since the former is getting deprecated soon. Also, fix pep8 E309.
Signed-off-by: Milind Shakya <sh.milind@gmail.com>
2016-06-02 16:35:23 -07:00
Andrey Devyatkin a67ba5536d Fix #3281: Unexpected result when using build args with default values
Fix the issue when build arg is set to None instead of empty string. Usecase:

cat docker-compose.yml
  .... args:
  - http_proxy
  - https_proxy
  - no_proxy

If http_proxy, https_proxy, no_proxy environment variables are not defined then http_proxy,
https_proxy, no_proxy build args will be set to string None which breaks all downloads

With this change undefined build args will be set to empty string instead of string None

Signed-off-by: Andrey Devyatkin <andrey.a.devyatkin@gmail.com>
2016-05-28 11:39:41 +02:00
Andrey Devyatkin c148849f0e Fix #3281: Unexpected result when using build args with default values
Fix the issue when build arg is set to None instead of empty string. Usecase:

cat docker-compose.yml
.... args:
- http_proxy
- https_proxy
- no_proxy

If http_proxy, https_proxy, no_proxy environment variables are not defined then http_proxy,
https_proxy, no_proxy build args will be set to string None which breaks all downloads

With this change undefined build args will be set to empty string instead of string None

Signed-off-by: Andrey Devyatkin <andrey.a.devyatkin@gmail.com>
2016-05-27 20:16:52 +02:00
Denis Makogon 1298b9aa5d Issue-3503: Improve timestamp validation in tests
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>
2016-05-27 14:50:13 +03:00
Andrey Devyatkin e3e8a619cc Fix #3281: Unexpected result when using build args with default values
Fix the issue when build arg is set to None instead of empty string.
Usecase:

cat docker-compose.yml
....
args:
- http_proxy
- https_proxy
- no_proxy

If http_proxy, https_proxy, no_proxy environment variables are not defined
then http_proxy, https_proxy, no_proxy build args will be set to string None which breaks all downloads

With this change build args will not passed to docker engine if they are equal to string None

Signed-off-by: Andrey Devyatkin <andrey.a.devyatkin@gmail.com>
2016-05-27 07:48:13 +02:00
Joffrey F 842e372258 Eliminate duplicates when merging port mappings from config files
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-05-20 15:28:35 -07:00
Aanand Prasad 7763122ecb Merge pull request #3459 from shin-/2487-split-volume-path
Always use the Windows version of splitdrive when parsing volume mappings
2016-05-20 11:42:43 +01:00
Joffrey F 2b5b665d3a Add test for path mapping with Windows containers
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-05-19 14:53:37 -07:00
Joffrey F db0a6cf2bb Always use the Windows version of splitdrive when parsing volume mappings
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-05-17 16:33:59 -07:00
Joffrey F 844b7d463f Update rm command to always remove one-off containers.
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-05-16 14:59:33 -07:00
Joffrey F 310b3d9441 Properly handle APIError failures in Project.up
Signed-off-by: Joffrey F <joffrey@docker.com>
2016-05-02 13:42:05 -07:00