summaryrefslogtreecommitdiff
path: root/docker/utils
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* | Remove trailing slashes in result of utils.parse_hostbase_url_trailing_slashJoffrey F2016-10-121-2/+2
|/ | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Pass file object to Tarfile.addfile()Christian Bundy2016-09-271-1/+12
| | | | | | | | | | This resolves an issue where TarFile.gettarinfo() doesn't include the file object, meaning that TarFile.addfile(TarFile.gettarinfo()) doesn't pass the test suite. Instead, this uses an open() within a try...except block to include a file object for each file without passing a file object when the path is a directory. Signed-off-by: Christian Bundy <christianbundy@fraction.io>
* Synthesize executable bit on WindowsSebastian Schwarz2016-09-271-1/+5
| | | | | | | | | | | The build context is tarred up on the client and then sent to the Docker daemon. However Windows permissions don't match the Unix ones. Therefore we have to mark all files as executable when creating a build context on Windows, like `docker build` already does: https://github.com/docker/docker/issues/11047. Signed-off-by: Sebastian Schwarz <seschwar@gmail.com>
* Fix a few pep8 issuesBen Firshman2016-09-141-1/+1
| | | | | | autopep8 --in-place --recursive --experimental -aaa --ignore E309 . Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Re-add docker.utils.types module for backwards compatibility1196-docker.utils.typesJoffrey F2016-09-091-0/+7
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Fix licensesBen Firshman2016-09-051-14/+0
| | | | | | | * Complete main LICENSE * Remove unnecessary licenses from individual files Signed-off-by: Ben Firshman <ben@firshman.co.uk>
* Merge pull request #1168 from docker/aiden0z-masterJoffrey F2016-08-251-1/+8
|\ | | | | Support pids_limit in HostConfig
| * Merge branch 'master' of https://github.com/aiden0z/docker-py into ↵Joffrey F2016-08-231-1/+8
| |\ | | | | | | | | | aiden0z-master
| | * fix #1094, support PidsLimit in host configAiden Luo2016-06-171-1/+8
| | | | | | | | | | | | Signed-off-by: Aiden Luo <aiden0xz@gmail.com>
* | | Fix creating containers with env vars with unicode charactersfermayo2016-08-251-1/+1
|/ / | | | | | | Signed-off-by: Fernando Mayo <fernando@docker.com>
* | support MemoryReservation and KernelMemoryKay Yan2016-08-231-2/+16
| | | | | | | | Signed-off-by: Kay Yan <kay.yan@daocloud.io>
* | Merge branch 'master' of https://github.com/srikalyan/docker-py into ↵Joffrey F2016-08-231-1/+9
|\ \ | | | | | | | | | srikalyan-master
| * | Added support for user namespace.Srikalyan Swayampakula2016-06-301-1/+9
| | | | | | | | | | | | Signed-off-by: Srikalyan Swayampakula <srikalyansswayam@gmail.com>
* | | Merge branch 'jp-cpushares' of https://github.com/joshpurvis/docker-py into ↵Joffrey F2016-08-231-1/+26
|\ \ \ | | | | | | | | | | | | joshpurvis-jp-cpushares
| * | | Move cpu_shares and cpuset_cpu to HostConfig when API >= 1.18Josh Purvis2016-08-151-1/+25
| | | | | | | | | | | | | | | | Signed-off-by: Josh Purvis <joshua.purvis@gmail.com>
* | | | Merge pull request #1131 from Knetic/dnsoptsJoffrey F2016-08-231-1/+7
|\ \ \ \ | | | | | | | | | | Implemented dns_opt support (from api 1.21)
| * | | | Implemented dns_opt support (from api 1.21)George Lester2016-08-071-1/+7
| |/ / / | | | | | | | | | | | | Signed-off-by: George Lester <glester491@gmail.com>
* | | | New docker.types subpackage containing advanced config dictionary typesJoffrey F2016-08-193-143/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests and docs updated to match docker.utils.types has been moved to docker.types Signed-off-by: Joffrey F <joffrey@docker.com>
* | | | Swarm service API implementationJoffrey F2016-08-171-1/+1
| | | | | | | | | | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | | | Add support for custom name in SwarmSpecJoffrey F2016-08-041-1/+4
| | | | | | | | | | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | | | Update arguments for several Swarm API methodsJoffrey F2016-08-042-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Client.update_swarm method Add test for Client.update_swarm Signed-off-by: Joffrey F <joffrey@docker.com>
* | | | Add new init_swarm test with custom specJoffrey F2016-08-031-2/+2
| | | | | | | | | | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | | | Update swarm methods to include newly added parametersJoffrey F2016-08-032-1/+53
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | Rename swarm methods to be more explicit Utility methods / types to create swarm spec objects Integration tests Signed-off-by: Joffrey F <joffrey@docker.com>