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

Use the installation directory as the default working directory

Open EronWright opened this issue 7 years ago • 1 comments

For the distDocker task that is generated in the presence of the application plugin, consider setting the workingDir to the installation directory. This would allow applications to use relative paths when referring to the conf directory, etc.

Here's a workaround, manually configure the distDocker task in build.gradle:

distDocker {
  def installDir = "/" + project.distTar.archiveName - ".${project.distTar.extension}"
  workingDir installDir
}

EronWright avatar Apr 08 '18 03:04 EronWright

That´s an interesting idea. We highly welcome all contributions, if you issue an PR for we may take a look at it

bjornmagnusson avatar May 08 '18 06:05 bjornmagnusson