Commit Graph

918 Commits

Author SHA1 Message Date
Nicolas De Loof 99e75639d6 define compose container names with a valid hostname
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-22 19:06:34 +02:00
Ulysses Souza 2a1e989f3e Stop only the service ran by it's up command
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-09-20 16:45:40 +02:00
Ulysses Souza 480a255a0e
Merge pull request #8620 from ndeloof/scale_0
get scale from deploy.replicas. Require scale normalization
2021-09-20 16:27:11 +02:00
Ulysses Souza 6b4b2ea633
Merge pull request #8635 from ndeloof/project_from_labels
rebuild compose project from labels
2021-09-20 16:24:32 +02:00
Ulysses Souza 3bf555cbd6 Fix lint make target
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-09-20 13:09:11 +02:00
Nicolas De Loof 48a6dc088b
rebuild compose project from labels
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-20 09:00:47 +02:00
Nicolas De Loof 18059295f7 waitForContainer to ensure stopped before remove
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-17 11:01:41 +02:00
Nicolas De Loof abb2ddba88 `compose config` to espace `$` signs so compose file is still valid
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-17 10:32:52 +02:00
Ulysses Souza 1150a323ab Add UnsupportedFlag to the declared errors
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-09-16 16:46:17 +02:00
aviau 21d3b19e57 compose/run: don't waitDependencies if NoDeps
Signed-off-by: aviau <alexandre@alexandreviau.net>
2021-09-16 11:09:44 +02:00
Nicolas De Loof a2947457b9
get scale from deploy.replicas. Require scale normalization
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-15 14:02:01 +02:00
Nicolas De Loof f7c360b721 run watchContainers with a background context
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-14 11:44:22 +02:00
Nicolas De Loof e71c833d79 set name from project config when recreating container
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-13 10:53:42 +02:00
Nicolas De Loof aa89fa5443 add support for build.network and build.extrahosts
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-09 11:05:01 +02:00
Nicolas De Loof f3171e90cf prefix volumes with `container:` as we resolve service into container
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-09 11:04:15 +02:00
Nicolas De Loof 0e0291510c support service entrypoint set as empty slice (override Dockerfile ENTRYPOINT)
close https://github.com/docker/compose/issues/8581

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-08 10:39:08 +02:00
Nicolas De Loof 2ceb176500 support --entrypoint="" as override
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-08 10:39:08 +02:00
Nicolas De Loof 1458beea84 stop log --follow on SIGINT
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-08 10:20:55 +02:00
Nicolas De Loof bd22aed868 fix panic on scale down
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-03 16:14:31 +02:00
Nicolas De Loof 22ee74391a
don't create container with autoremove so we can inspect for exitcode
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-01 16:53:57 +02:00
Nicolas De Loof 81879c4f4b
update project's volumes_from before retrieving service
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-09-01 10:48:12 +02:00
Nicolas De Loof 1ae9b3cb5d
move compose-cli code into docker/compose/v2
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-08-31 19:09:19 +02:00
Nicolas De Loof 007ec5afee
set proxy env vars based on CLI config
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-08-31 14:04:31 +02:00
Lorena Rangel 52df801287
Merge pull request #2044 from ndeloof/build_services
Only build requested services
2021-08-31 10:34:26 +02:00
Nicolas De Loof 78faf0dc51
prepare volume for service set by `run`
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-08-30 09:45:43 +02:00
Nicolas De Loof 19cbbdd79e
only build requested services
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-08-26 15:55:19 +02:00
Nicolas De loof 6a6dafbdb5
Merge pull request #2026 from ulyssessouza/warn-pull-build 2021-08-25 14:39:47 +02:00
Nicolas De loof a5e8ab2d64
Merge pull request #2037 from ndeloof/volume_from_deps
include volume_from as a source for implicit dependencies
2021-08-25 11:18:35 +02:00
Nicolas De Loof 4b808e569c
include volume_from as a source for implicit dependencies
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-08-25 11:02:19 +02:00
Nicolas De Loof 58bfbbb288
introduce ImageDigestLabel to track image built for service
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-08-25 10:03:51 +02:00
Ulysses Souza 682c7d74b9 Lower project name for "compose down"
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-08-18 14:21:16 -03:00
Ulysses Souza 4364b48238 Add build warning on pull
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-08-18 11:04:02 -03:00
Lorena Rangel 15f07f2e13 Revert "introduce ImageDigestLabel to track image built for service"
Signed-off-by: Lorena Rangel <lorena.rangel@docker.com>
2021-08-09 17:27:23 +02:00
Nicolas De Loof 64cea4fab3
introduce ImageDigestLabel to track image built for service
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-08-06 16:14:03 +02:00
Nicolas De Loof 4b18d30871
ignore one-off container events
close https://github.com/docker/compose-cli/issues/1955

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-08-05 11:50:32 +02:00
Nicolas De Loof 94997be633
include exposed ports in container ports config
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-30 11:14:26 +02:00
Hironao OTSUBO 1a0efdd413 Fix issue `docker compose rm -s` not removing containers
Signed-off-by: Hironao OTSUBO <motemen@gmail.com>
2021-07-29 23:37:48 +09:00
Nicolas De loof b9f38feb25
Merge pull request #1935 from shua/scale0 2021-07-26 08:23:50 +02:00
JD Lloret c82dd55fd2
allow for 0 scale/replicas
Signed-off-by: JD Lloret <jd.lloret@joyent.com>
2021-07-23 11:38:20 -04:00
Nicolas De Loof 86eadc7d67
reduce complexity (linter)
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-23 15:20:53 +02:00
Nicolas De Loof 0b72b502d3
close container stream on os.stdin EOF
close https://github.com/docker/compose-cli/issues/1944

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-23 14:53:26 +02:00
Nicolas De Loof c257001e5a
Restore support for control sequence in `compose run`
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-23 13:58:58 +02:00
Nicolas De loof 7a4e111794
Merge pull request #1852 from ulyssessouza/logs-follow-scale 2021-07-12 17:23:37 +02:00
Ulysses Souza 287f3156ae Detect new containers on logs --follow
Signed-off-by: Ulysses Souza <ulyssessouza@gmail.com>
2021-07-12 09:02:51 -03:00
Nicolas De Loof 0a5b43d1e3
report error when there's no container to start
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-12 12:10:50 +02:00
Mathieu Champlon 2d0d3881ac Fix slice access
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
2021-07-07 12:57:13 +02:00
Mathieu Champlon 9317ffc0ab Serialize access to observed state
This should fix concurrent accesses to the map.

Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
2021-07-07 12:25:32 +02:00
Mathieu Champlon 918fe00f3e Fix loop variable captures in goroutines
Signed-off-by: Mathieu Champlon <mathieu.champlon@docker.com>
2021-07-07 12:25:22 +02:00
Nicolas De Loof bee156fb97
close sdtin stream on EOF to propagate exec process' stdin
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-02 17:02:20 +02:00
Nicolas De Loof 96e1e041d6
distinguish stdout and stderr
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-07-02 10:53:11 +02:00
Nicolas De loof 4bf7829d1b
Merge pull request #1860 from ndeloof/detach_keys
add support for detach keys on compose run|exec
2021-06-30 09:44:11 +02:00
Nicolas De Loof b6552cd935
add support for detach keys on compose run|exec
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-29 17:27:43 +02:00
Nicolas De Loof fb73dd58d9 Move compose e2e tests into pkg
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-28 08:47:58 +02:00
Nicolas De Loof c901edd65d
introduce `convergence` to hold per-service Containers and prevent race conditions
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-25 13:18:00 +02:00
Nicolas De loof 98a781f5cf
Merge pull request #1827 from ndeloof/ipam 2021-06-23 15:58:26 +02:00
Nicolas De loof 8d2019e77d
Merge pull request #1831 from ndeloof/inherit_volumes
inherit anoymous volumes
2021-06-23 15:35:18 +02:00
Nicolas De Loof 05b510a447
compose ps to include container command
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-22 16:09:47 +02:00
Nicolas De Loof 444fc26a51
inherit anoymous volumes
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-22 14:37:52 +02:00
Nicolas De Loof 2fdc2e1dfb apply IPAM configuration to network and services
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-22 11:23:57 +02:00
Nicolas De Loof 7f18b47a9a prefer canonical `compose.yaml` file name
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-22 11:23:57 +02:00
Nicolas De Loof 852aae0a39 don't apply restart_policy on `compose run`
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-21 08:25:41 +02:00
Lorena Rangel b5d3eda223 only disconnect active networks in a container
Signed-off-by: Lorena Rangel <lorena.rangel@docker.com>
2021-06-17 16:55:22 +02:00
Lorena Rangel b38d35ae1c set container links and external links in network
Signed-off-by: Lorena Rangel <lorena.rangel@docker.com>
2021-06-17 15:51:14 +02:00
Nicolas De Loof 399f6cde5e
document public variable
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-17 15:35:50 +02:00
Nicolas De Loof df9fa2d2d8
better interoperability with docker-compose on version label
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-16 14:40:33 +02:00
Afshin Paydar df6d709aa5 Merge branch 'main' of github.com:docker/compose-cli into docker_compose_logs_since_option 2021-06-16 08:57:02 +08:00
Nicolas De Loof 49e7f2d45d Move compose v2 implementation under pkg/compose with dependencies
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-15 15:52:48 +02:00
Nicolas De Loof d90495e1cd move compose API into pkg/api
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2021-06-15 15:52:48 +02:00