gradle-docker icon indicating copy to clipboard operation
gradle-docker copied to clipboard

Add --build-arg support

Open ShadowCoder22 opened this issue 7 years ago • 7 comments

Docker allows users to pass arguments to the build command. This is useful for cases where a developer has to calculate a variable at build time. Please consider adding support for this feature.

ShadowCoder22 avatar Jul 14 '16 15:07 ShadowCoder22

As I see it, only reason for using this property would be when using an static/external Dockerfile. When plugin is generating the Dockerfile you already can provide properties from within you build script

bjornmagnusson avatar Mar 05 '17 18:03 bjornmagnusson

Unsupported in docker-java 2.2.0 (used by plugin in master). Needs docker-java 3.0.0+, which includes breaking changes. Postpone this to an later release.

bjornmagnusson avatar Mar 05 '17 19:03 bjornmagnusson

It would be nice to have this so that you could add build time arguments to a Dockerfile LABEL like this

docker build --build-arg VCS_REF=`git rev-parse --short HEAD` .

gclayburg avatar Aug 26 '17 00:08 gclayburg

Yes; or to pass parameters to other Dockerfile elements that the plugin doesn't have support for; such as HEALTHCHECK

chadlwilson avatar Sep 24 '17 15:09 chadlwilson

News on this? Need to disable the cache

mklueh avatar Dec 24 '17 13:12 mklueh

No work has been done. It is indeed a wanted feature We do welcome PRs.

bjornmagnusson avatar Jan 15 '18 14:01 bjornmagnusson

Any progress on this ?

jainarpit6 avatar Sep 03 '18 12:09 jainarpit6