aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordanielhanrahan <daniel.hanrahan@est.tech>2022-09-01 15:03:20 +0100
committerdanielhanrahan <daniel.hanrahan@est.tech>2022-09-01 15:03:20 +0100
commitbd96c8fb2d9160c5166e7d3035436d6d78da9797 (patch)
treeba27a314f33ce9b3271d348a173742fe96a4b00a
parenta3b05955caa7e6e5eeb487e650662cf774b14440 (diff)
Allow setting external dockerfile for distribution
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: Ic6851e77e4b5bb8d8dc51bc4824560270806987b
-rw-r--r--packages/policy-distribution-docker/pom.xml2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/policy-distribution-docker/pom.xml b/packages/policy-distribution-docker/pom.xml
index 79ce0361..2ee2711f 100644
--- a/packages/policy-distribution-docker/pom.xml
+++ b/packages/policy-distribution-docker/pom.xml
@@ -44,6 +44,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>
@@ -107,6 +108,7 @@
<build>
<cleanup>try</cleanup>
<dockerFile>${dockerFile}</dockerFile>
+ <contextDir>${docker.contextDir}</contextDir>
<tags>
<tag>${project.version}</tag>
<tag>${project.version}-${maven.build.timestamp}</tag>