summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2022-08-30 07:31:13 +0100
committerDaniel Hanrahan <daniel.hanrahan@est.tech>2022-08-30 15:36:44 +0000
commit07ba043caa37f61258722e58ffb098470d74b3d6 (patch)
treee4bcfb18774be36ad19ac297258fca868e233513
parent579204990a84fbd5593b2ce61ad3c2a5560ed894 (diff)
Allow setting external dockerfile for policy-api
If building with an external dockerfile, e.g. using mvn clean install -Pdocker -DdockerFile=/path/to/dockerfile docker will look for project files in the same directory as the new dockerfile. A new property is added for setting the context path, to allow using existing project files in src/main/docker. Issue-ID: POLICY-4334 Signed-off-by: danielhanrahan <daniel.hanrahan@est.tech> Change-Id: Iebfa6f3bcfeccf70675231acd4b6d7f629f56223
-rw-r--r--packages/policy-api-docker/pom.xml2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/policy-api-docker/pom.xml b/packages/policy-api-docker/pom.xml
index d9c47bb9..1f7714d0 100644
--- a/packages/policy-api-docker/pom.xml
+++ b/packages/policy-api-docker/pom.xml
@@ -43,6 +43,7 @@
<docker.skip>false</docker.skip>
<docker.skip.build>false</docker.skip.build>
<docker.skip.push>false</docker.skip.push>
+ <docker.contextDir>${project.basedir}/src/main/docker</docker.contextDir>
<maven.build.timestamp.format>yyyyMMdd'T'HHmm</maven.build.timestamp.format>
</properties>
@@ -106,6 +107,7 @@
<build>
<cleanup>try</cleanup>
<dockerFile>${dockerFile}</dockerFile>
+ <contextDir>${docker.contextDir}</contextDir>
<tags>
<tag>${project.version}</tag>
<tag>${project.version}-${maven.build.timestamp}</tag>