From a43545a28bca575800817d9517b26978a37bc4f5 Mon Sep 17 00:00:00 2001 From: Benedikt Ziemons Date: Mon, 27 Dec 2021 18:29:25 +0100 Subject: [PATCH] Put all build args into env vars in image@.service --- image@.service | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/image@.service b/image@.service index 0354b78..09af882 100644 --- a/image@.service +++ b/image@.service @@ -10,7 +10,8 @@ Type=oneshot Environment=PODMAN_SYSTEMD_UNIT=%n LogExtraFields=IMAGE=%i ExecCondition=/usr/bin/bash -c '[[ $(podman images --format json localhost/%i | jq .\\[0\\]) == "null" ]]' -ExecStart=/usr/bin/podman build --tag localhost/%i $EXTRAOPTS /docker/containers/%i +Environment="IMAGE_TAG=localhost/%i" "BUILD_SOURCE=/docker/containers/%i" +ExecStart=/usr/bin/podman build --tag ${IMAGE_TAG} $EXTRAOPTS ${BUILD_SOURCE} Restart=no RemainAfterExit=yes TimeoutStartSec=1h