Status: Gathering Interest (View Workflow)
When running a non-detached container in Bamboo using the Docker task, and the container fails to start, the Bamboo build will fail but the Docker container is not removed on completion of the task.
There may be an error in the logs related to the command being executed inside the container but it will not hint that the container is not removed.
Possible excessive disk usage may hint at the problem.
Cleanup the container if the Docker task failed to run.
We would like to have an option to remove the container if the Docker Task failed to start a container.
The leftover containers will not influence subsequent builds so may go unnoticed for some time. If the Docker service on the agent hasn't been restarted in a while this may lead to excessive disk usage. You can reclaim the disk space by manually removing the container using the docker rm command, for example:
docker rm my-failed-container