Transmode / gradle-docker

A Gradle plugin to build Docker images from the build script.
Apache License 2.0
647 stars 142 forks source link

Unable to get gradle build working with an external Dockerfile #88

Closed alan-czajkowski closed 7 years ago

alan-czajkowski commented 8 years ago

@mattgruter can you please post a complete example using an external Dockerfile, the documentation is not clear enough

I tried:

docker {
  dockerfile "./Dockerfile"
}

and I get the error:

Could not find method dockerfile() for arguments [./Dockerfile] on root project 'example'.
sanimalp commented 8 years ago

I think you just have a minor syntax error.

dockerfile = file('Dockerfile')

should work.

bjornmagnusson commented 7 years ago

Just tried (with plugin version 1.2 and the native client).

dockerfile = './Dockerfile' works dockerfile = 'Dockerfile' works dockerfile "./Dockerfile" works

Can not reproduce this error.