Commit Graph

458 Commits

Author SHA1 Message Date
Nicolas De Loof e433777796
resolve build args without value from environment
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-29 10:43:09 +02:00
Nicolas De Loof b33588b725
when bind mount has CreateHostPath set, use bind API
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-27 17:03:16 +02:00
Guillaume Tardif 6c5bd67c19 Fix race in TestAttachRestart : wait for logs to appear rather than have a fixed TTL for the application
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-04-26 12:01:24 +02:00
guillaume.tardif df7f57e227 one more windows adaptation
Signed-off-by: guillaume.tardif <guillaume.tardif@gmail.com>
2021-04-23 13:21:10 +02:00
Guillaume Tardif 95179f1625 Compose Cancel test not compile/run on windows (no signals)
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-04-23 12:39:55 +02:00
guillaume.tardif 4fa4284eb4 Adapt compose tests to pass with Desktop Windows
Signed-off-by: guillaume.tardif <guillaume.tardif@gmail.com>
2021-04-23 12:04:42 +02:00
Guillaume Tardif de3fa40bae Handle Ctrl+C for compose CLI plugin.
Could do something nicer passing the context to the compose command, rather than intercepting it and checking if it’s “.WithCancel” or not...

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-04-23 10:21:05 +02:00
Guillaume Tardif 0785114b90 Also ensure we don’t need compose cloud integration to run compose CLI plugin
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-04-22 22:03:52 +02:00
Guillaume Tardif 1fce1623ee Cross build & package compose-cli plugin
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-22 17:51:29 +02:00
Guillaume Tardif c7dc12d310 E2E tests using compose CLI plugin
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-04-22 17:51:29 +02:00
Guillaume Tardif 1dc97e8c4b Compose as a cli plugin
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-22 17:51:29 +02:00
Nicolas De Loof 85af8cdaaa local backend to rely on dockerCli's LoadDefaultConfigFile
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-22 17:51:28 +02:00
Guillaume Tardif ec693fc5f8 Fir port display assertion, Docker engine returns 2 entries in container inspect
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-04-22 17:34:26 +02:00
Guillaume Tardif cc0423df6e Fix down not working if run from a different folder than up, because container labels stored relative paths
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-04-22 16:19:31 +02:00
Nicolas De Loof c83c46293f
fix race: poll for service completion. Using waitContainer might happend after container exit
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-22 08:51:25 +02:00
Nicolas De loof cd4a08d0d6
Merge pull request #1530 from aiordache/recreate_after_build 2021-04-20 21:05:37 +02:00
Nicolas De loof 510ffc10a5
Merge pull request #1577 from ndeloof/stop_services
only stop/remove selected services
2021-04-20 21:05:03 +02:00
Nicolas De Loof 5cead2266d
only stop/remove selected services
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-20 19:06:41 +02:00
aiordache c227fd5c5f refactor to reduce calls to InspectRawImage
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-04-20 15:18:08 +02:00
aiordache 31de84f547 Set image digest as service image to trigger recreation after build
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-04-20 15:15:24 +02:00
Guillaume Tardif b96dc49bcb Avoid panic: concurrent map writes
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-04-20 11:13:00 +02:00
Ulysses Souza 0fbeedfb6e Fix progress writer network creation and removal
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-04-19 17:27:10 -03:00
Guillaume Tardif 66f90098cd
Merge pull request #1550 from docker/local-test-cleanup
Local test cleanup
2021-04-19 17:51:01 +02:00
Guillaume Tardif 02b9363233 avoid assertions in defer statements.
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-04-19 17:33:51 +02:00
Chris Crone c804b7a5a6 local.e2e: Fix Compose start/stop tests
* Fix strings.Contains ordering
* Correct logic

Signed-off-by: Chris Crone <christopher.crone@docker.com>
2021-04-19 12:50:16 +02:00
Chris Crone c0e5fbba99 local.e2e: Reduce number of test images
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2021-04-19 12:50:16 +02:00
Nicolas De Loof a8819763b4
scale must ignore oneoff containers
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-16 09:15:22 +02:00
Nicolas De Loof 334e362d91 don't set aliasses if no network binding was declared
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-15 16:37:57 +02:00
Nicolas De Loof 0ab75d28ba don't report error resizing tty, as container could stop any time
see 04dad42c3c/cli/command/container/tty.go (L71) wich always return nil

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-15 10:13:19 +02:00
Nicolas De Loof 597598cb7a only start container once we have a wait channel set, to prevent race condition with fast terminating container
see https://github.com/docker/cli/blob/master/cli/command/container/run.go#L157-L168

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-15 10:13:19 +02:00
Nicolas De Loof 1dc0c4cef9
fix warning message
close https://github.com/docker/compose-cli/issues/1536

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-14 08:19:22 +02:00
Nicolas De loof 8e8635f520
Revert "E2e test improvements" 2021-04-13 17:15:19 +02:00
Nicolas De loof 9abd990e1c
Merge pull request #1533 from chris-crone/e2e-test-improvements 2021-04-13 15:44:30 +02:00
Nicolas De loof 0b968395dd
Merge pull request #1516 from docker/version_json
don't include stderr in moby exec output
2021-04-13 15:43:27 +02:00
Nicolas De Loof 4916b36b99
don't include stderr in moby exec output
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-13 15:35:26 +02:00
Nicolas De loof 31e93963f7
Merge pull request #1512 from docker/resize
resize terminal and monitor SIGWINCH
2021-04-13 15:33:33 +02:00
Nicolas De loof 5841e75cb2
Merge pull request #1532 from chris-crone/fix-scan-msg
Fix scan message with quiet flag
2021-04-13 15:30:23 +02:00
Chris Crone af74207f82 local.e2e: Reduce number of test images
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2021-04-13 15:15:55 +02:00
Chris Crone 411612ed8d Fix scan message with quiet flag
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2021-04-13 14:30:27 +02:00
Nicolas De Loof 6ec682cade
ignore mount options which don't match type
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-13 11:53:06 +02:00
Nicolas De Loof 26b8ef0f49 pass config file to buildkit for authentication
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-13 09:49:13 +02:00
Nicolas De loof 184c2b8c1a
Merge pull request #1503 from docker/metrics-failures 2021-04-13 08:37:23 +02:00
Nicolas De Loof 076f15c254
configure container limits and resources
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-12 15:46:18 +02:00
Guillaume Tardif 073d8e5545 Categorize failure metrics, set specific metrics for compose file parse error, file not found, cmdline syntax errors, build error, pull error.
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-04-09 17:20:29 +02:00
Ulysses Souza 378d02dadd Refactor `up --build`
This restarts containers which had it's images rebuilt

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-04-08 20:37:16 -03:00
Nicolas De Loof be5d78ad10
resize terminal and monitor SIGWINCH
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-08 12:33:11 +02:00
Nicolas De loof 6aed81e951
Merge pull request #1511 from gtardif/fix_test_race
Avoid race between parallel tests, add specific build sample for scan_message_test
2021-04-08 12:18:31 +02:00
Guillaume Tardif eb7732ffec
Merge pull request #1505 from aiordache/image_cmd
Add `compose images` cmd
2021-04-08 11:24:35 +02:00
Guillaume Tardif 088b13b9df Avoid race between parallel tests, add specific build sample for scan_message_test
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-04-08 11:04:24 +02:00
Nicolas De loof d073c93ff7
Merge pull request #1509 from docker/pause_project_name
pause/unpause only need project name. use getContainers where possible
2021-04-08 10:00:16 +02:00
Nicolas De Loof 7d85485242
pause/unpause only need project name. use getContainers where possible
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-08 09:40:50 +02:00
aiordache 08055d7c7a Add `compose images` cmd
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-04-07 16:08:09 +02:00
Nicolas De Loof 15a21a449f
add support for service_completed_successfully
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-07 14:31:15 +02:00
Nicolas De loof 5b61e80e92
Merge pull request #1467 from ulyssessouza/progress-tail-msgs
Add plain tail messages on progress writer
2021-04-07 10:20:47 +02:00
Nicolas De Loof dc036c2686
don't use filepath to process remote bind paths
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-04-06 13:29:25 +02:00
Guillaume Tardif d5efef2aa7 Use old build for windows engine also on compose up
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-04-01 09:59:01 +02:00
Guillaume Tardif ac1696e47b Removed race in e2e test
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-03-30 17:00:10 +02:00
Nicolas De loof 9df272a893
Merge pull request #1470 from aiordache/build_args
Add `no-cache` build flag
2021-03-30 15:58:28 +02:00
Guillaume Tardif 2b1158f4c2 Adapt cli/mobycli to avoid duplicating shellout code
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-03-30 13:45:05 +02:00
aiordache e92b2f80d2 Shell out to docker cli for windows container builds
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-03-30 13:42:52 +02:00
Guillaume Tardif 435a51f9e4 Add scan message after docker build, add e2e tests
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-03-29 19:12:06 +02:00
aiordache 3f0ee7072f Add `no-cache` build flag
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-03-26 18:16:22 +01:00
Ulysses Souza e5834f37fd Add tail messages on progress writer
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-03-25 18:21:36 -03:00
Guillaume Tardif ee4e85ae1d
Merge pull request #1462 from docker/rawTerminal
set terminal in character mode when attached to a container
2021-03-25 18:17:27 +01:00
Guillaume Tardif d13bc958bc
Merge pull request #1463 from aiordache/ipc_support
Add IPC support
2021-03-25 16:13:56 +01:00
Guillaume Tardif b24a3e1486
Merge pull request #1455 from ulyssessouza/cache-container-list-on-down
Reuse container list on command down
2021-03-25 16:13:10 +01:00
aiordache baeede2c6c Add IPC support
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-03-25 10:27:15 +01:00
Ulysses Souza 31e59f6919 Refactor Down to avoid double ContainerList
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-03-24 17:48:23 -03:00
Ulysses Souza 02744ac4f9 Add --ignore-pull-failures to command pull
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-03-24 14:44:04 -03:00
Nicolas De Loof d4a8e92f46
set terminal in character mode when attached to a container
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-03-24 15:37:32 +01:00
Nicolas De Loof 9af5ea4b6a
run ContainerWait in background so we catch container exit
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-03-22 16:31:10 +01:00
Guillaume Tardif 6562ec80f4
Merge pull request #1444 from docker/config_flags
introduce config --services, --volumes, --hash for backward compatibility
2021-03-19 16:57:25 +01:00
Nicolas De Loof ec5489a08c
introduce config --services, --volumes, --hash for backward compatibility
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-03-19 15:40:24 +01:00
Guillaume Tardif 9ace15c9e5
Merge pull request #1439 from docker/build_url
Support build.context with git URLs
2021-03-19 15:12:08 +01:00
Guillaume Tardif a86a4737da
Merge pull request #1438 from docker/port
introduce `port` command for parity with docker-compose
2021-03-19 15:08:09 +01:00
Guillaume Tardif e0344ea7b4
Merge pull request #1415 from ulyssessouza/add-restart
Add restart command
2021-03-19 15:04:57 +01:00
Nicolas De Loof 8b38874aba
introduce `port` command for parity with docker-compose
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-03-19 13:31:42 +01:00
Nicolas De Loof 4b1297ec71
Support build.context with git URLs
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-03-19 10:21:12 +01:00
Nicolas De loof 3366131096
Merge pull request #1437 from gtardif/compose-e2e-cleanup
Cleanup remaining containers after compose e2e tests
2021-03-19 08:06:46 +01:00
Guillaume Tardif 34d03cce57 Cleanup remaining containers after compose e2e tests
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-03-18 17:03:53 +01:00
Ulysses Souza 1926820daa Add e2e tests
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-03-18 09:51:28 -03:00
Nicolas De Loof 70694e12a2
add support for a few more composefile attributes
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-03-18 11:22:40 +01:00
Guillaume Tardif 3f502000e2
Merge pull request #1434 from docker/PortBindings
set PortBinding HostIP
2021-03-17 18:35:39 +01:00
Nicolas De Loof 8f7e7abc6c
set PortBinding HostIP
close https://github.com/docker/compose-cli/issues/1403

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-03-17 14:05:03 +01:00
Nicolas De Loof 949e8bb090
use "container name witout project" for both logs and events
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-03-17 11:38:43 +01:00
Ulysses Souza 2fdc3bad48 Add restart command
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-03-16 02:02:36 -03:00
Guillaume Tardif 8c99bb2c29 Fix build image label mapping
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-03-15 11:33:37 +01:00
Guillaume Tardif e2d92ece50 Fix log expectation with random exec order
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-03-15 11:12:25 +01:00
Nicolas De loof 30e2d1d360
Merge pull request #1424 from gtardif/more_composefiles_attr
Map composefiles privileged, isolation
2021-03-15 09:23:11 +01:00
Guillaume Tardif 92e4d0bf2a
Merge pull request #1413 from docker/refactor
refactoring: create backend in main then pass as command target
2021-03-12 16:27:35 +01:00
Nicolas De Loof 48402585fd
replace passing parameters by context with singletons
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-03-12 15:28:17 +01:00
Guillaume Tardif c176fcc1d9 Map composefiles privileged, isolation
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-03-12 10:08:01 +01:00
Guillaume Tardif 2c50885484 Add support for composefile attributes
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-03-11 17:18:30 +01:00
Guillaume Tardif 9301c298ef
Merge pull request #1390 from ulyssessouza/quiet-pull
Add `quietPull` option to `up`
2021-03-11 09:09:55 +01:00
Ulysses Souza aa4d15d28c Add `quietPull` option to `up`
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-03-10 11:43:53 -03:00
Guillaume Tardif f4c68428bd Add remote engine context e2e
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-03-10 13:51:28 +01:00
Nicolas De loof 3999eea066
Merge pull request #1400 from docker/tls_flags 2021-03-09 14:48:53 +01:00
Nicolas De loof 4a8a1aeb48
Merge pull request #1396 from docker/events
introduce docker compose events
2021-03-08 14:37:15 +01:00
Nicolas De Loof 9c4d8ab158
(re)attach to container after restart
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-03-08 14:11:15 +01:00
Guillaume Tardif 3f600281e6
Merge pull request #1354 from ulyssessouza/fix-pull-arch
Take `platform` in account on pulling and building images
2021-03-08 12:24:10 +01:00