fabric8io / docker-maven-plugin

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

SaveMojo: Add `docker.save.mode` option #1219

Open rhuss opened 5 years ago

rhuss commented 5 years ago

Description

As result of the discussion in https://github.com/fabric8io/docker-maven-plugin/issues/1197#issuecomment-485228687 it would be good to have an option docker.save.mode with two possible values:

docker.save.file should in both cases point to the target file name under which the archive should be created.

radamanth commented 5 years ago

It would be really great to be able to build docker image without the need of a Docker Daemon

rhuss commented 5 years ago

@radamanth that's a different discussion, though ;-) There will be eventually support for one way or another to create an image without a Docker daemon (which gets directly pushed to a Docker registry).

In the meantime, you might want to have a look to https://github.com/GoogleContainerTools/jib which has a Maven plugin for doing exactly this.

Beennnn commented 5 years ago

@radamanth As discussed in https://github.com/fabric8io/docker-maven-plugin/issues/1197#issuecomment-485228687 this change will allow to create the Dockerfile without the need for a Docker Daemon.

rhuss commented 5 years ago

@Beennnn tbh, #1197 is for creating the input for a Docker build, but not the directly usable image (e.g. where RUN directives have been performed). This is a big difference.

Beennnn commented 5 years ago

@rhuss exactly !

Beennnn commented 5 years ago

@rhuss This issue has not changed during the past 3 months. How can we move on to implementation ? Can we include #1197 as a first step ?

rhuss commented 5 years ago

@Beennnn so sorry and big apologies for this delay. I'm recently eaten up by other works (not even Java anymore these days) but will try now to move the PRs forward.

rhuss commented 5 years ago

I agree, that we can split up this issue in two: One for docker:save and one for docker:build.

As docker:build is more important to you, I suggest to implement as described in https://github.com/fabric8io/docker-maven-plugin/issues/1197#issuecomment-482028662 and then move on to this issue.

I for sure don't have the spare cycles to implement this feature, but I'm happy to help to integrate it (reviewing + merging).

So if you feel fancy, please send a PR.