spotify / docker-maven-plugin

INACTIVE: A maven plugin for Docker
Apache License 2.0
2.67k stars 575 forks source link

[feature-request] Remove intermediate containers after build #373

Closed dminca closed 6 years ago

dminca commented 6 years ago

Preamble

After using this plugin on our buildmachines, we noticed after a period of time that our agents were failing to execute pipelines because disk was filling quite fast. The builds were not being able to cleanup after themselves with the help of this plugin because it didn't have this feature.

Request details

During the docker build phase, we're requiring a mechanism to remove intermediate containers after a successful build. This option comes native in the docker-engine: docker build --rm <other-params>

As I saw by browsing through the issues, the docker build --no-cache option already exists (which is awesome), imagine if you combine it with the --rm argument, then no one would actually be forced to setup cleanup crons on buildmachines for cleaning up containers/images.

# docker-build manpage: man docker-build
--rm=true|false
   Remove intermediate containers after a successful build. The default is true.

Please consider implementing this feature, as I don't think I'm the only one wanting to evade from these kind of errors, you're going to help many SysAdmins and Developers :sweat_smile:

screenshot from 2018-02-19 17-55-36

davidxia commented 6 years ago

We recommend users switch to https://github.com/spotify/dockerfile-maven. This project is now bug fix only mode.