Guillaume Tardif
db73c928f3
Ensure image exist for run service
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-18 10:01:08 +01:00
Guillaume Tardif
dc211b178a
Fixed race when down with multiple containers for one service
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-18 10:01:08 +01:00
Guillaume Tardif
32d5644937
Pass reader Writer as options to backend, remove hardcoded os.Stdout
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-18 10:01:06 +01:00
Guillaume Tardif
bad0d41d90
Auto-remove using container config
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-18 10:00:19 +01:00
Guillaume Tardif
d2cfffafb4
Attach to container using compose attach
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-18 10:00:19 +01:00
Guillaume Tardif
76f36a69c6
Reusing existing Create() and Start() API
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-18 10:00:18 +01:00
Guillaume Tardif
27dc2e5be1
Reuse Create(Project) and Start(Project)
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-18 09:59:02 +01:00
Guillaume Tardif
8eb9733914
No need to support service `container_name` in this PR, will do separately, minor cleanup
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-18 09:59:02 +01:00
Guillaume Tardif
d127cac6d4
Ensure images exist before starting progress display for network / volumes, otherwise progress display is all mixed up
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-18 09:59:02 +01:00
Guillaume Tardif
7bed2343e6
Remove not implemented options
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-18 09:59:02 +01:00
Guillaume Tardif
b289138ca9
No need to filter services again in backend, filter is done by cli command. Added e2e test, labels one-off and slug
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-18 09:59:02 +01:00
aiordache
412385c495
Add `compose run` command
...
Signed-off-by: aiordache <anca.iordache@docker.com>
2020-12-18 09:58:55 +01:00
Nicolas De Loof
e2c55c2122
e2e test for local `Log` command
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-17 11:48:58 +01:00
Nicolas De Loof
eda6a59379
introduce options struct in the API
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-17 11:10:57 +01:00
Nicolas De Loof
855a879a6a
Introduce `removeOrphans` to cleanup injected AWS simulation container
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-17 10:46:17 +01:00
Nicolas De Loof
056dfb95bc
allow to collect logs for a subset of project services
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-17 10:32:46 +01:00
Chris Crone
65561c085a
deps: Bump docker and buildx vendoring
...
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-12-16 10:57:42 +01:00
Chris Crone
87153b9d25
local.compose.build: Ensure images are exported
...
If a user has BUILDX_NO_DEFAULT_LOAD=1 set, then the images will
not be stored in the image store unless we explicitly say that they
must be.
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-12-11 11:08:49 +01:00
Chris Crone
ddaec1a367
compose.build: Wait for progress writer after build
...
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-12-11 10:40:09 +01:00
Chris Crone
6e76aadfd6
deps: Bump buildx and docker vendoring
...
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2020-12-11 10:40:09 +01:00
Djordje Lukic
72cec58ed1
Check if stdin is nil before closing
...
getContainerStreams returns a nil stdin if the container is already running
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-12-11 10:08:27 +01:00
Guillaume Tardif
cf378834e5
No rebuild on compose up if image already exists by default, added first use of compose pull_policy and `compose up --build` to allow to force rebuild.
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-10 18:38:16 +01:00
Nicolas De Loof
446008a4b6
on ACI container ID is `project_service` and name is `service`
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-09 14:39:10 +01:00
Nicolas De Loof
1f5a77e67c
move test to command-specific test file
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-09 10:33:52 +01:00
Nicolas De Loof
1d859dc807
`Ps` return ContainerSummary, not Services
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-09 10:33:51 +01:00
Guillaume Tardif
e4ed2b02d7
Fix container attaching to wrong volume name for compose non-external volumes. Took the opportunity to validate R/O volumes, but not related to this fix
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-08 18:48:18 +01:00
Djordje Lukic
033941d890
compose: Add service labels
...
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-12-08 16:32:30 +01:00
Nicolas De Loof
1eb40999e2
Split compose.go into command-focussed go files
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-08 11:58:49 +01:00
Djordje Lukic
f6c4c4e590
Move compose e2e tests to own folder
...
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-12-08 11:30:25 +01:00
Guillaume Tardif
8ee2286126
Merge pull request #1021 from gtardif/fix_down_no_containers
...
Ensure down continues (removes networks) even if containers have been removed already
2020-12-07 17:33:26 +01:00
Guillaume Tardif
b987f2eaf8
Merge pull request #1023 from docker/fix-build-target
...
Pass the target to buildkit
2020-12-07 17:31:20 +01:00
Guillaume Tardif
d0728d94f2
Fix compose volume creation and check this in volume e2e test
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-07 16:57:55 +01:00
Djordje Lukic
7d88fc61d3
Pass the target to buildkit
...
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-12-07 16:47:58 +01:00
Guillaume Tardif
fe363fd146
Fix compose volume creation and check this in volume e2e test
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-07 16:42:43 +01:00
Guillaume Tardif
2657f5804e
Ensure down continues (removes networks) even if containers have been removed already. Avoid returning nil error and nil project in `projectFromContainerLabels`
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-07 15:48:57 +01:00
Nicolas De loof
576aa46d21
Merge pull request #1015 from docker/logConsumer
...
Revisit logs/up API to pass a LogConsumer vs io.Writer
2020-12-07 14:57:43 +01:00
Nicolas De Loof
ca123e08eb
Revisit logs/up API to pass a LogConsumer vs io.Writer
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-07 14:47:44 +01:00
Guillaume Tardif
fea0cf8c82
Fix linter
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-07 14:46:31 +01:00
Guillaume Tardif
6fc8eefb1b
Remove build flag for local backend
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-07 14:41:27 +01:00
Guillaume Tardif
ec5afcfd4d
`compose up` and other compose commands running on “Moby” context type.
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-07 14:41:27 +01:00
Nicolas De Loof
26fe75a7e3
Remove stopped containers on `down`
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-07 11:39:21 +01:00
Guillaume Tardif
ff1808644c
Remove flakyness in compose e2e test : can’t count networks as we have several compose stacks start in //
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-07 09:31:32 +01:00
Guillaume Tardif
d0b840bcd1
Fix compose up build when no image name in compose file.
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-04 18:19:34 +01:00
Guillaume Tardif
aacd881358
Add -d flag in e2e tests now that `docker compose up` attaches to logs by default
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-04 15:19:12 +01:00
Guillaume Tardif
0b2eaede8c
Adding unit test for bind mount creation
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-04 13:49:43 +01:00
Guillaume Tardif
814536c0bd
Fixing bind mount with relative path when specifying relative working dir. Added first local compose volume e2e test
...
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-04 13:49:43 +01:00
Djordje Lukic
fcddb77b48
Give progress its own context
...
The build and progress can't share the same context, the progress context
needs to live longer for the progress to be able to read all the messages
from build.
Signed-off-by: Djordje Lukic <djordje.lukic@docker.com>
2020-12-04 13:05:26 +01:00
Nicolas De loof
6830ca1919
Merge pull request #1006 from gtardif/compose_fix_down_deps
...
Fix service initial status in graph, in order to fix compose down duplicate removal of container
2020-12-04 11:03:42 +01:00
Nicolas De Loof
136d09e1ac
split `Up` into `Create`+`Start` so logs don't collide with progress
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-04 08:16:50 +01:00
Nicolas De Loof
39e4107e12
attach to log stream by default on `up`
...
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2020-12-03 16:51:00 +01:00