Ulysses Souza
37eb7a509b
Decode APIError explanation to unicode before usage
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-01-06 16:00:34 +01:00
Ulysses Souza
cba8ad474c
Fix by adding an assert to make the comparison effective
...
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2020-01-06 15:53:32 +01:00
Ulysses Souza
cd098e0cad
Pin test images on a non rolling tag
...
Mainly busybox:latest to the current latest which is 1.31.0-uclibc
Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-07-18 11:10:37 +02:00
Inconnu08
c37fb783fe
replace sets with set literal syntax for efficiency
...
Signed-off-by: Taufiq Rahman <taufiqrx8@gmail.com>
2019-06-01 01:31:35 +06: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
Henke Adolfsson
87935893fc
Update data for unit tests
...
Signed-off-by: Henke Adolfsson <catears13@gmail.com>
2019-03-08 07:43:53 +01:00
Andriy Maletsky
01eb4b6250
Lower severity to "warning" if down
tries to remove nonexisting image
...
Signed-off-by: Andriy Maletsky <andriy.maletsky@gmail.com>
2018-12-28 13:21:23 -08:00
Joffrey F
61bb1ea484
Don't append slugs to containers created by "up"
...
This change reverts the new naming convention introduced in 1.23 for service containers.
One-off containers will now use a slug instead of a sequential number as they do not
present addressability concerns and benefit from being capable of running in parallel.
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-27 18:58:55 -08:00
Joffrey F
ccc777831c
Don't add long path prefix to build context URLs
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-11-26 15:26:27 -08:00
Antony MECHIN
39b0518850
tests.unity.service: Make sure volumes order is preserved.
...
Signed-off-by: Antony MECHIN <antony.mechin@docker.com>
2018-09-26 15:57:27 +02:00
Joffrey F
5916639383
Preserve container numbers, add slug to prevent name collisions
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-09-12 12:07:52 -07:00
Joffrey F
4e2de3c1ff
Replace sequential container indexes with randomly generated IDs
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-09-11 15:26:58 -07:00
Joffrey F
707e21183f
Fix config hash consistency with unprioritized networks
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-08-07 16:51:01 -07:00
Joffrey F
c3bb958865
Ignore default platform if API version doesn't support platform param
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-05-04 14:51:53 -07:00
Joffrey F
aecc0de28f
Prevent duplicate binds in generated container config
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-04-26 15:20:45 -07:00
Joffrey F
520f5d0fde
Add 2.4 file format with platform support. Also reads DOCKER_DEFAULT_PLATFORM env
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-30 12:39:10 -07:00
Joffrey F
070474acae
Fix unit tests
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-29 17:21:47 -07:00
Joffrey F
2e100353d3
Add support for build isolation parameter
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-29 16:57:07 -07:00
Joffrey F
7e787a8c15
Merge pull request #5822 from brainlock/fix-gh-5179
...
fix race condition in Service.create_container()
2018-03-27 09:24:40 -07:00
Alberto Piai
394c8efe98
fix race condition in Service.create_container()
...
The Service.create_container() method fetches a list of the current
containers in order to determine the next container number. In doing so,
it makes several API calls: one to fetch the list of containers, then
one per container in order to inspect it.
In some situations it can happen that a container is removed after
having been listed: in that case, the call to inspect will get a 404 and
raise a NotFound.
One situation in which this has been observed is when trying to
concurrently create multiple one-off containers for the same service
(using `docker-compose run` and a unique `--name`), as described in
more detail in gh-5179.
This patch adds a unit test that simulates the race between the
calls to list and to inspect, and changes Service._next_container_number
to skip removed containers instead of blowing up.
Fixes gh-5179
Signed-off-by: Alberto Piai <apiai@sensational.ch>
2018-03-27 10:21:15 +02:00
Joffrey F
255d16d7fa
Add --compress option to build command
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-03-23 17:05:15 +01:00
Matthieu Nottale
31dcfcff2a
Revamp ParallelStreamWriter to fix display issues.
...
Signed-off-by: Matthieu Nottale <matthieu.nottale@docker.com>
2018-03-07 15:22:38 +01:00
Joffrey F
5e4700b176
Add proxy_config tests
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-23 14:32:43 -08:00
Joffrey F
d4106679a6
Use configfile-provided proxy values to populate buildargs and env values
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-22 16:19:50 -08:00
Joffrey F
3a0ed8cbba
Modified options dict leads to a mismatched config hash for API < 1.30
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-02-06 16:58:15 -08:00
Joffrey F
d8d484e0e1
Bump python SDK to 3.0.0
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2018-01-31 18:54:58 -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
79b20eb53f
Add support for mount syntax
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-12-05 16:21:49 -08:00
Joffrey F
9098a67394
Merge pull request #5410 from sethktaylor11/5374-build-memory
...
Adds support for a memory build-arg in docker-compose build.
2017-12-04 14:00:09 -08:00
Samantha Miller
a6cdd62726
Adds support for a memory flag to docker-compose build.
...
Signed-off-by: Samantha Miller <samantha.a.miller123@gmail.com>
2017-12-03 13:59:32 -06:00
Joffrey F
415fa6c59b
Use mounts for secrets instead of volumes
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-29 12:21:56 -08:00
Joffrey F
d48002a09d
Merge pull request #5361 from docker/5282-build-extra-hosts
...
Add support for extra_hosts in build config
2017-11-09 16:30:35 -08:00
Joffrey F
c5408f3a40
Add support for extra_hosts in build config
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-11-09 14:57:24 -08:00
Joffrey F
0079ac52c6
Merge pull request #5250 from garribas/4801-progress-markers
...
Progress markers are not shown correctly for docker-compose up (fixes…
2017-11-09 14:29:34 -08:00
Andy Neff
0e4bd32a65
Added unit test and used stop_timeout
...
Signed-off-by: Andy Neff <andyneff@users.noreply.github.com>
2017-11-01 13:30:49 -07:00
Guillermo Arribas
9c5347bd23
Placing dots in hostname no longer populates domainname if api >= 1.23 ( fixes #4128 )
...
Signed-off-by: Guillermo Arribas <garribas@gmail.com>
2017-10-19 16:31:18 -07:00
Joffrey F
7df1b53ad2
Move build labels parsing to config module
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-10-16 11:56:36 -07:00
Guillermo Arribas
57eb1c463f
Progress markers are not shown correctly for docker-compose up ( fixes #4801 )
...
Signed-off-by: Guillermo Arribas <garribas@gmail.com>
2017-10-13 22:54:39 -03:00
Guillermo Arribas
6de646d3b0
Build labels option: array form produces unmarshal error ( fixes #5183 )
...
Signed-off-by: Guillermo Arribas <garribas@gmail.com>
2017-10-13 22:49:41 -03:00
Joffrey F
08714ef796
Add get_secret_volumes unit tests
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-10-13 17:43:07 -07:00
Marc van den Hoogen
dc838067fd
Add shm_size to build-options (issue #3866 )
...
* Add shm_size to build configuration
* Make it possible to enlarge/customize shm size during build
* Value in bytes, or use string like "512M" or "1G" ...
* Add to compose format 2.3 and (provisionally) >=3.5 format
* Add automated test for shm_size in build-opts
Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
Made unit tests compatible with previously added shm_size build-option
Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
Also support shm_size build-opt when conf override
Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
Automated test for shm_size build-option
Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
Schema 3.4, add shm_size to schema 2.3, updated const.py
Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
Corrected typo in config_schema_v3.4
Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
Add support for g/m/k units for shm_size in build-opts
Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
Reorder imports in service.py
Signed-off-by: Marc van den Hoogen <marc@vandenhoogen.eu>
2017-09-29 15:50:17 -07:00
Yong Wen Chua
1ecf51c209
Add target
to service build configuration
...
Signed-off-by: Yong Wen Chua <me@yongwen.xyz>
2017-07-20 17:06:59 -07:00
Joffrey F
e33041582f
Add "network" field to build configuration
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-07-06 12:17:46 -07:00
Colin Hebert
7fca689efd
Update tests to show labels set to None
...
Signed-off-by: Colin Hebert <hebert.colin@gmail.com>
2017-05-23 12:03:36 -07:00
Joffrey F
a0cf0a2009
Avoid rebinding tmpfs data volumes when recreating containers
...
Signed-off-by: Joffrey F <joffrey@docker.com>
2017-04-25 15:10:57 -07: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
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
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