I have run into an issue where if a pipeline step using this plugin is manually stopped, only the container in which the commands are being run from is stopped.
When a build or step is manually cancelled, it triggers the ensure_stopped function in run.sh, which only stops and removes the container by the name of $(docker_compose_project_name)_${run_service}_build_${BUILDKITE_BUILD_NUMBER} instead of all containers defined in the docker-compose file. It also prevents the pre-exit hook from running, which would actually stop and remove all the containers.
As a workaround I've defined an agent-level post-checkout hook which updates run.sh to execute the pre-exit hook . Unsure of what the ideal solution here is though, but I believe it should be addressed as in my case it resulted in RAM and disc space being consumed indefinitely after each manually cancelled build, degrading performance over time.
Many thanks 😄