spotify / dockerfile-maven

MATURE: A set of Maven tools for dealing with Dockerfiles
Apache License 2.0
2.75k stars 493 forks source link

More docker build options via the configuration #347

Closed michel404 closed 4 years ago

michel404 commented 4 years ago

Is this a BUG REPORT or FEATURE REQUEST?: feature request

Description

Looking at the usage docs, there are a few items than can be configured:

However docker's build command has many more options. I think it would be great to be able to config all of them as well.

How to reproduce

For example: using the command line it is possible to do

docker build . -t myimage --add-host myhost:172.123.123.123

There is no way to do the equivalent using this plugin (yet).

Apart from --add-host, there are also other options available in the CLI.

What do you expect

Something like this to be possible in the plugin configuration in the pom file:

(...)
            <configuration>
              <repository>myimage</repository>
              <addHosts> <!-- this is my suggested addition -->
                <myhost>172.123.123.123</myhost>
              </addHosts>
              <!-- other options like `rm` etc -->
            </configuration>
(...)

What happened instead

(not applicable)

Software:

Server: Engine: Version: 18.09.7 API version: 1.39 (minimum version 1.12) Go version: go1.10.1 Git commit: 2d0083d Built: Wed Aug 14 19:41:23 2019 OS/Arch: linux/amd64 Experimental: false


- Spotify's dockerfile-maven version: `1.4.13`

## Full backtrace
(not applicable)
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.