fabric8io / docker-maven-plugin

Maven plugin for running and creating Docker images
https://dmp.fabric8.io
Apache License 2.0
1.88k stars 643 forks source link

Support for Creating Volumes #611

Open raystorm opened 8 years ago

raystorm commented 8 years ago

Description

I would like to be able to Docker Volumes Create command from Maven.

Is this possible/supported?

Thank you

rhuss commented 8 years ago

Thanks for the feature request. Yes, I think volume support make sense(same as the recently introduced support for auto creating networks makes sense. So auto-creating referenced volumes which do not yet exists would make sense.

Hope I can work on this any time soon (no promises ;-) but we are taking PR requests, too ;-) If you are interested I could give you some pointers where to start best.

raystorm commented 8 years ago

I took a brief look at the code but not deep enough to really tell.

I assume this would be a whole new class extending AbstractDockerMojo. Beyond that I haven't looked enough to see how your actually calling the Docker API.

raystorm commented 7 years ago

I've recently hit a wall in my own work where I need this feature. I had some time today, and have forked your repo and written up an attempt at the feature.

My Next steps where to add unit tests. In following your contributer guidlines. I've written up Volume Support Parallel to the Container Support (much less feature rich). Any Tips/pointers on where to be begin for writing the unit tests?

Thank you.

raystorm commented 7 years ago

Pull Request submitted: https://github.com/fabric8io/docker-maven-plugin/pull/654

raystorm commented 7 years ago

654 was closed. In favor of the the updated #664