Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow a Dockerfile for defining an Image to build #13

Closed
rhuss opened this issue Jul 31, 2014 · 2 comments
Closed

Allow a Dockerfile for defining an Image to build #13

rhuss opened this issue Jul 31, 2014 · 2 comments
Assignees
Labels
Milestone

Comments

@rhuss
Copy link
Collaborator

rhuss commented Jul 31, 2014

Similar to https://github.com/spotify/docker-maven-plugin it should be possible to further tune the parameters for building the data image:

  • Allow a Dockerfile
  • Entry Point

BTW, @rculbertson, wouldn't it be an option to merge efforts ? I.e. one of the highlights of this plugin is to use a plain maven-assembly-plugin decscriptor for creating the data container (which is much more flexible than including files via path only).

@rhuss
Copy link
Collaborator Author

rhuss commented Dec 5, 2014

The idea is also to support Dockerfiles directly, probably a bit similar as the spotify/docker-maven-plugin does. In contrast to the run case we should not reinvent everything a Dockerfile provides. Im still thinking about how to combine the assembly mechanism (which is unique to this plugin) with a user provided Dockerfile (where all this volume exports can be declared directly in the "docker language").

So some of the ideas are:

  • Specify a directory with a regular Dockerfile in the configuration
  • Substitute maven properties
  • Have a comment-tag or a placeholder where to put in the directory with the content specified via an assembly. This would be replaced on-the-fly when building an image
  • Other goodies like code blocks with a list of shell commandos, given line by line, which are concatenated before the build to with && to avoid extra image layers. That's probably more a syntactic sugar, but other pre-processing things might prove useful here, too.

At the end there could be two use case: For building a simple data image or a simple microservice everything can be specified in the build configuration section directly in the pom.xml. For more complex needs (like your example with a specific volume export), a real Dockerfile can be provided (along with support files directly in the same directory and which can be added directly in the Dockerfile). The latter mode then should still support assemblies for sucking in dependencies and artifacts without providing ugly pathes into some target directory.

@rhuss rhuss changed the title Additional options for defining a data container Allow a Dockerfile for defining an Image to build Dec 5, 2014
@rhuss rhuss added this to the 0.10.7 milestone Dec 5, 2014
@jgangemi jgangemi self-assigned this Feb 19, 2015
@jgangemi
Copy link
Collaborator

added in 0.11.1, closing

leusonmario pushed a commit to leusonmario/docker-maven-plugin that referenced this issue Aug 18, 2018
…tory-structure

Plugin now retains directory structure of resources
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants