compose/pkg/e2e/testdata/TestStartCreatedUseAPISocketService/compose.yaml
Nicolas De Loof 821153b2e4 fix(start): give a started use_api_socket service its config file
A container created beforehand and only started by `compose start`
(`create` then `start`, `up --no-start` then `start`, or a dependency named
to `start`) came up with DOCKER_CONFIG pointing at /run/secrets/docker and no
file there: use_api_socket is applied by rewriting the project, and the
config file it adds is injected when a container starts, from the project the
start works on. Create and run applied the rewriting, start did not.

start() now applies it too, on the copy it already makes of the project, so
the caller's is left alone, and a project already rewritten (a dependency
started by run) is not rewritten twice. The rewriting tolerates a project
without environment or configs maps, as the one `compose start` loads.

up -d, a foreground up, scale and run already provided the file.

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2026-10-26 17:16:24 +01:00

6 lines
103 B
YAML

services:
app:
image: alpine
init: true
use_api_socket: true
command: sleep infinity