Transmode / gradle-docker

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

Use the installation directory as the default working directory #134

Closed EronWright closed 1 year ago

EronWright commented 6 years ago

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
}
bjornmagnusson commented 6 years ago

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