summaryrefslogtreecommitdiff
path: root/docker/utils
Commit message (Collapse)AuthorAgeFilesLines
* Add support for new ContainerSpec parametersJoffrey F2017-10-262-1/+7
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Do not interrupt streaming when encountering 0-length framesJoffrey F2017-08-311-2/+2
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Commit d798afca made changes for the handling of '**' patterns inVeli-Matti Lintu2017-08-211-1/+1
| | | | | | | | .dockerignore. This causes an IndexError with patterns ending with '**', e.g. 'subdir/**'. This adds a missing boundary check before checking for trailing '/'. Signed-off-by: Veli-Matti Lintu <veli-matti.lintu@nosto.com>
* Fix handling of non-multiplexed (TTY) streams over upgraded socketsJoffrey F2017-08-171-1/+20
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Leading slash in .dockerignore should be ignoredJoffrey F2017-08-151-0/+1
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Generating regexp from .dockerignore file in a similar way as docker-ce.Jakub Goszczurny2017-08-011-8/+19
| | | | Signed-off-by: Jakub Goszczurny <szczurmys@o2.pl>
* Compose 1.14.0 hackJoffrey F2017-06-281-0/+5
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* split_port should not break when passed a non-string argumentJoffrey F2017-06-281-0/+1
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Merge pull request #1649 from shin-/1639-exec-id-check-resourceJoffrey F2017-06-191-16/+15
|\ | | | | Update check_resource decorator to account for new resource names
| * Update check_resource decorator to account for new resource namesJoffrey F2017-06-151-16/+15
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Rewrite the split_port function using rekaiyou2017-06-051-67/+40
|/ | | | | | | | In the case of a defined format with specific parts, a regular expression with named capturing bits make reasoning about the parts simpler than imlementing a parser from scratch. Signed-off-by: kaiyou <pierre@jaury.eu>
* Fix test issuesappveyorJoffrey F2017-03-292-9/+10
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Raise an error when passing an empty string to split_portJoffrey F2017-03-091-0/+2
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* fix: Missing exception handling in split_port when no container portLei Gong2017-03-091-0/+5
| | | | | | | | | | "localhost:host_port:" case will raise TypeError exception directly Catch the "TypeError" and give proper error message * docker/utils/ports.py Signed-off-by: Lei Gong <xue177125184@gmail.com>
* passing flake8 testSeungJin Oh2017-02-201-1/+1
| | | | Signed-off-by: SeungJin Oh <crierr@naver.com>
* check NoneType before usingSeungJin Oh2017-02-201-2/+4
| | | | Signed-off-by: SeungJin Oh <crierr@naver.com>
* Allow port range like 8000-8010:80crierr2017-02-201-3/+6
| | | | Signed-off-by: SeungJin Oh <crierr@naver.com>
* Merge pull request #1449 from shin-/secrets-apiJoffrey F2017-02-151-1/+1
|\ | | | | Implement secrets API
| * Add support for secrets in ContainerSpecJoffrey F2017-02-131-1/+1
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Add support for recursive wildcard pattern in .dockerignoreJoffrey F2017-02-144-134/+247
|/ | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Add create_plugin implementationJoffrey F2017-02-092-12/+29
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Ignore socket files in utils.tarJoffrey F2017-01-241-2/+7
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Accept / as a path separator in dockerignore patterns on all platformscompose-4302-dockerignore-windowsJoffrey F2017-01-061-9/+17
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Rename non-URL occurrences of docker-py to "Docker SDK for Python"docker_sdk_renameJoffrey F2016-12-121-3/+4
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Merge branch 'patch-1' of https://github.com/manics/docker-py into ↵manics-patch-1Joffrey F2016-12-021-0/+1
|\ | | | | | | | | | | manics-patch-1 Signed-off-by: Joffrey F <joffrey@docker.com>
| * Use format_environment to convert env in ContainerSpecSimon Li2016-11-111-1/+1
| | | | | | | | Signed-off-by: Simon Li <orpheus+devel@gmail.com>
* | Move config type creation from docker.utils functions to classes inconfig_typesJoffrey F2016-12-013-609/+18
| | | | | | | | | | | | docker.types Signed-off-by: Joffrey F <joffrey@docker.com>
* | Merge pull request #1308 from docker/docker_clientJoffrey F2016-11-301-1/+1
|\ \ | | | | | | Rename Client -> DockerClient
| * | Rename Client -> DockerClientdocker_clientJoffrey F2016-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Replace references to old Client with APIClient Moved contents of services.md to appropriate locations Signed-off-by: Joffrey F <joffrey@docker.com>
* | | Merge pull request #1277 from ↵Ben Firshman2016-11-291-19/+32
|\ \ \ | | | | | | | | | | | | | | | | bodnarbm/do-not-traverse-ignored-directories-with-no-potential-exceptions Do not traverse excluded directories that are not prefixes of dockerignore exceptions.
| * | | Prevent traversing excluded directories with no possible dockerignore exceptionsBrandon Bodnar2016-11-261-19/+32
| |/ / | | | | | | | | | | | | | | | Fixes an issue where all files in a rather large excluded folder are traversed and examined when creating the build context for potential exception to the exclusion, even though the exclusion rule is for a completely unrelated folder. Signed-off-by: Brandon Bodnar <bodnarbm@gmail.com>
* | | Merge pull request #1250 from mmerickel/fix/1211Joffrey F2016-11-281-3/+7
|\ \ \ | | | | | | | | do not assume that read will consume the number of bytes requested
| * | | do not assume that read will consume the number of bytes requestedMichael Merickel2016-11-281-3/+7
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The issue is that ``os.read`` does not always read the expected number of bytes, and thus we are moving to the next frame too early causing drift in the byte stream. When the reading drifts, it starts reading garbage as the next frame size. The some examples of frame sizes were 4032897957 bytes, etc. Values this large were causing the exceptions from ``os.read``. fixes #1211 Signed-off-by: Michael Merickel <michael@merickel.org>
* | | Merge pull request #1297 from docker/stepanstipl-allow_custom_pid_modeJoffrey F2016-11-281-3/+3
|\ \ \ | | | | | | | | Allow custom pid mode
| * | | Re-enable pid_mode checks for API < 1.24stepanstipl-allow_custom_pid_modeJoffrey F2016-11-281-0/+2
| | | | | | | | | | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
| * | | Allow custom PID mode for the containerStepan Stipl2016-11-281-3/+1
| |/ / | | | | | | | | | | | | | | | | | | Docker added support for sharing PID namespaces with other containers since version 1.12 (see https://github.com/docker/docker/pull/22481). Signed-off-by: Stepan Stipl <stepan@stipl.net>
* | | Fix parsing for an environment file with newlinesJon Cotton2016-11-281-1/+5
|/ / | | | | | | | | | | Fixes the new, purposely broken test added in the previous commit. Signed-off-by: Jon Cotton <jc@finaltransfer.net>
* | Add new user-focused APIBen Firshman2016-11-221-0/+79
| | | | | | | | | | | | See #1086 Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* | Add docstrings to low-level APIBen Firshman2016-11-221-0/+51
| | | | | | | | Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* | Make docker.utils.ports a single fileBen Firshman2016-11-222-4/+0
| | | | | | | | Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* | Merge pull request #1236 from docker/host_config_isolationJoffrey F2016-11-171-1/+9
|\ \ | | | | | | Add support for isolation param in host config
| * | Add support for isolation param in host confighost_config_isolationJoffrey F2016-09-291-1/+9
| | | | | | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | | Convert dicts to Healthcheck objects, string commands to CMD-SHELL listsAanand Prasad2016-11-161-1/+4
| | | | | | | | | | | | Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com>
* | | Add support for passing healthcheck to create_containerJamie Greeff2016-11-161-1/+8
| |/ |/| | | | | Signed-off-by: Jamie Greeff <jamie@greeff.me>
* | WIPJoffrey F2016-11-042-0/+15
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Fix dockerignore exclusion logic on Windowswin32-test-fixesJoffrey F2016-10-141-2/+2
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Merge pull request #1254 from docker/npipe-advancedJoffrey F2016-10-141-1/+8
|\ \ | | | | | | Several fixes to npipe support
| * | Several fixes to npipe supportnpipe-advancedJoffrey F2016-10-121-1/+8
| |/ | | | | | | | | | | | | | | | | - Fix _get_raw_response_socket to always return the NpipeSocket object - Override NpipeHTTPConnectionPool._get_conn to avoid crash in urllib3 - Fix NpipeSocket.recv_into for Python 2 - Do not call select() on NpipeSocket objects Signed-off-by: Joffrey F <joffrey@docker.com>
* | Merge pull request #1256 from docker/format_env_unicode_bugJoffrey F2016-10-131-0/+3
|\ \ | | | | | | Do not break when calling format_environment with unicode values
| * | Do not break when calling format_environment with unicode valuesformat_env_unicode_bugJoffrey F2016-10-121-0/+3
| |/ | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>