Docker containers don't get removed after execution
Summary
When using the docker executor and running a build, the "build" and "predefined" containers will stay after the build.
Expected behavior
I expect the containers to be removed afterwards when the executor cleans up.
Used GitLab Runner version
Version: 9.1.0
Git revision: 0118d89
Git branch: 9-1-stable
GO version: go1.7.5
Built: Fri, 21 Apr 2017 14:32:04 +0000
OS/Arch: linux/amd64
I looked a bit into this and it seems like if all created containers used to go into the array builds
of the executor
struct (executor_docker.go). The method Cleanup
then took care of removing them afterwards. But since 38dff79d9a36df5e0f7df0c52654aabc1ab452f8 builds
stays completly empty because the line s.builds = append(s.builds, container)
in createContainer
got removed.