Fossil SCM

The "container-run" target now runs "container-image" conditionally, building it only if it wasn't created in a prior step. This allows custom image builds followed by a one-command way of running that built image. Without this, the custom image gets stomped on.

wyoung 2022-11-30 12:19 trunk
Commit a9e862b88716a83af87053f0f0214d4acf51120e73aeaedd5b4602bfbea3a538
1 file changed +3 -1
+3 -1
--- Makefile.in
+++ Makefile.in
@@ -127,11 +127,13 @@
127127
--tag fossil:@FOSSIL_CI_PFX@ \
128128
--build-arg FSLURL=$(SRCTB) \
129129
$(DBFLAGS) @srcdir@
130130
rm -f $(SRCTB)
131131
132
-container-run: container-image
132
+container-run:
133
+ docker image inspect fossil:@FOSSIL_CI_PFX@ > /dev/null 2>&1 || \
134
+ $(MAKE) container-image
133135
docker run \
134136
--name fossil-@FOSSIL_CI_PFX@ \
135137
--cap-drop AUDIT_WRITE \
136138
--cap-drop CHOWN \
137139
--cap-drop FSETID \
138140
--- Makefile.in
+++ Makefile.in
@@ -127,11 +127,13 @@
127 --tag fossil:@FOSSIL_CI_PFX@ \
128 --build-arg FSLURL=$(SRCTB) \
129 $(DBFLAGS) @srcdir@
130 rm -f $(SRCTB)
131
132 container-run: container-image
 
 
133 docker run \
134 --name fossil-@FOSSIL_CI_PFX@ \
135 --cap-drop AUDIT_WRITE \
136 --cap-drop CHOWN \
137 --cap-drop FSETID \
138
--- Makefile.in
+++ Makefile.in
@@ -127,11 +127,13 @@
127 --tag fossil:@FOSSIL_CI_PFX@ \
128 --build-arg FSLURL=$(SRCTB) \
129 $(DBFLAGS) @srcdir@
130 rm -f $(SRCTB)
131
132 container-run:
133 docker image inspect fossil:@FOSSIL_CI_PFX@ > /dev/null 2>&1 || \
134 $(MAKE) container-image
135 docker run \
136 --name fossil-@FOSSIL_CI_PFX@ \
137 --cap-drop AUDIT_WRITE \
138 --cap-drop CHOWN \
139 --cap-drop FSETID \
140

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button