Description
In our CI environment we want to do something like this to attach test reports to builds:
docker compose run test-toolbox run_tests.sh
docker compose cp test-toolbox:/reports ./ci-output
Describe the results you received:
This fails because the container used in the run is in a stopped state
service test-toolbox not running
Describe the results you expected:
Because we didn't do --rm , files copied to the host
Additional information you deem important (e.g. issue happens only occasionally):
On slack @ndeloof suggested it was this listing that needs to also find stopped containers https://github.com/docker/compose/blob/v2/pkg/compose/cp.go#L74
This happens locally and on our gitlab runners
Output of docker-compose --version:
Docker Compose version v2.1.1
Description
In our CI environment we want to do something like this to attach test reports to builds:
Describe the results you received:
This fails because the container used in the run is in a stopped state
Describe the results you expected:
Because we didn't do
--rm, files copied to the hostAdditional information you deem important (e.g. issue happens only occasionally):
On slack @ndeloof suggested it was this listing that needs to also find stopped containers https://github.com/docker/compose/blob/v2/pkg/compose/cp.go#L74
This happens locally and on our gitlab runners
Output of
docker-compose --version: