Commit Graph

173 Commits

Author SHA1 Message Date
Guillaume Tardif 8ab3149f45 Network names and volume names don’t need anymore to be re-adapted (and prefixed with project name) after loaded from compose-go
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-14 10:07:29 +01:00
Guillaume Tardif 7dd3a5a1eb Remove duplicate compute of image name & add unit test
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-13 17:30:01 +01:00
Nicolas De Loof 609eeb0962
We actually support volume labels and driver_opts
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-01-13 10:15:57 +01:00
Nicolas De loof 947009d772
Merge pull request #1113 from docker/local_inline_secrets 2021-01-11 10:31:32 +01:00
aiordache 30d6e1b9e2 override inherited secret mounts
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-01-08 16:33:30 +01:00
aiordache ebeef45e85 Implement secrets via bind-mounts for local compose
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-01-08 11:29:14 +01:00
Guillaume Tardif 7a6712afdb Do not inspect for double container name at creation time, this has already been checked, let moby error bubble up if there is a name clash at this stage
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-08 10:59:58 +01:00
Ulysses Souza 0021b14de8 Add unit tests to container_name
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-01-08 10:05:53 +01:00
Ulysses Souza b3993230d1 Add network alias to container name
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-01-07 17:06:40 -03:00
Ulysses Souza b264e1814b Add warning on container_name and scale > 1
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-01-07 17:06:40 -03:00
Ulysses Souza 8976a20698 Use `container_name` property on service
This applies `container_name` when available in
the service definition.

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-01-07 17:06:40 -03:00
Nicolas De loof 1cf48318a4
Merge pull request #1106 from docker/orphans
introduce --remove-orphans option
2021-01-07 10:16:43 +01:00
aiordache 31e40176da Add GPU support via DeviceRequests
Signed-off-by: aiordache <anca.iordache@docker.com>
2021-01-07 10:00:19 +01:00
Nicolas De Loof 4de01936f8
introduce --remove-orphans option
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-01-06 14:36:59 +01:00
Guillaume Tardif 0a5328748a When running compose down, remove containers with Force=true in case some container is still up for any reason (happened in some E2E test once)
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2021-01-06 10:07:40 +01:00
Guillaume Tardif df4fed266b
Merge pull request #1095 from docker/push_pull
ignore services without image attribute
2021-01-05 19:13:13 +01:00
Nicolas De Loof 5a455e47c3
ignore services without image attribute
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-01-05 09:47:29 +01:00
Ulysses Souza cef7a2d4ce Refactor ProjectName
This separate project name and service name for command `run`

Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-01-04 14:11:54 +00:00
Guillaume Tardif 3714ab7d41 Attaching container logs
Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
2020-12-18 10:01:08 +01:00
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