summaryrefslogtreecommitdiff
path: root/docker/utils
Commit message (Collapse)AuthorAgeFilesLines
* Rewrite utils.parse_host to detect more invalid addresses.ssh_protocol_supportJoffrey F2018-11-011-58/+72
| | | | | | | | The method now uses parsing methods from urllib to better split provided URLs. Addresses containing query strings, parameters, passwords or fragments no longer fail silently. SSH addresses containing paths are no longer accepted. Signed-off-by: Joffrey F <joffrey@docker.com>
* Add support for SSH protocol in base_urlJoffrey F2018-11-011-5/+11
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Re-add walk method to utils.buildJoffrey F2018-06-281-0/+5
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* On Windows, convert paths to use forward slashes before fnmatch callJoffrey F2018-06-281-5/+13
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Improved .dockerignore pattern processing to better match Docker CLI behaviorJoffrey F2018-06-282-88/+112
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Fix socket reading function for TCP (non-HTTPS) connections on WindowsJoffrey F2018-06-061-0/+3
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Improve extra_files override checkJoffrey F2018-03-271-1/+2
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Move build utils to appropriate fileJoffrey F2018-03-273-93/+93
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Support building with Dockerfile outside of contextJoffrey F2018-03-272-7/+27
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Don't descend into symlinks when building context tarJoffrey F2018-03-211-1/+1
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Remove redundant single-socket select callJoffrey F2018-03-201-2/+1
| | | | | | Clean up + use pytest-timeout Signed-off-by: Joffrey F <joffrey@docker.com>
* Use same split rules for Dockerfile as other include/exclude patterns1956-dockerignore-include-dockerfileJoffrey F2018-03-141-2/+5
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Add note about potential dockerignore optimization.mefyl2018-02-211-0/+9
| | | | Signed-off-by: mefyl <quentin.hocquet@docker.com>
* Skip entirely excluded directories when handling dockerignore.mefyl2018-02-211-0/+4
| | | | | | | This is pure optimization to not recurse into directories when there are no chances any file will be included. Signed-off-by: mefyl <quentin.hocquet@docker.com>
* Fix .dockerignore: accept wildcard in inclusion pattern, honor last line ↵mefyl2018-02-211-114/+74
| | | | | | precedence. Signed-off-by: mefyl <quentin.hocquet@docker.com>
* Fix dockerignore handling of absolute path exceptions.mefyl2018-02-211-3/+3
| | | | Signed-off-by: mefyl <quentin.hocquet@docker.com>
* Revert "Correctly support absolute paths in .dockerignore"mefyl2018-02-191-13/+7
| | | | | | This reverts commit 34d50483e20e86cb7ab22700e036a5c4d319268a. Signed-off-by: mefyl <quentin.hocquet@docker.com>
* Correctly support absolute paths in .dockerignorec5672-dockerignore-abspathJoffrey F2018-02-121-7/+13
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Merge pull request #1901 from docker/1899-create_archive_fixJoffrey F2018-02-051-5/+3
|\ | | | | Rewrite access check in create_archive with EAFP
| * Rewrite access check in create_archive with EAFP1899-create_archive_fixJoffrey F2018-02-051-5/+3
| | | | | | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* | Add workaround for bpo-32713c5618-negative-mtime-tarJoffrey F2018-02-011-0/+4
|/ | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Remove parameters and methods marked as deprecatedJoffrey F2018-01-312-26/+1
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Improve separation between auth_configs and general_configsimprove_authconfig_genconfig_separationJoffrey F2018-01-302-5/+6
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Use config.json for detachKeysFumiaki MATSUSHIMA2018-01-301-0/+65
| | | | Signed-off-by: Fumiaki Matsushima <mtsmfm@gmail.com>
* Do not break when archiving broken symlinks1841-tar-broken-symlinksJoffrey F2018-01-291-1/+2
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Merge pull request #1830 from mhank/1822-reformat-hostsJoffrey F2017-12-131-1/+7
|\ | | | | Fix format in which hosts are being stored for Swarm services
| * Change format in which hosts are being stored for Swarm servicesMichael Hankin2017-12-051-2/+8
| | | | | | | | Signed-off-by: Michael Hankin <mhank@users.noreply.github.com>
| * Change format of extra hostsMichael Hankin2017-12-031-1/+1
| | | | | | | | Signed-off-by: Michael Hankin <mjhankin1@gmail.com>
* | Fix common issues with build context creation: inaccessible files and fifosfix-context-buildingJoffrey F2017-11-291-7/+14
|/ | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Add support for new ContainerSpec parametersJoffrey F2017-11-072-1/+7
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Do not interrupt streaming when encountering 0-length framesJoffrey F2017-11-071-2/+2
| | | | Signed-off-by: Joffrey F <joffrey@docker.com>
* Commit d798afca made changes for the handling of '**' patterns inVeli-Matti Lintu2017-08-221-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-171-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-171-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>