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.
Commit
a9e862b88716a83af87053f0f0214d4acf51120e73aeaedd5b4602bfbea3a538
Parent
3e95d94583a1de1…
1 file changed
+3
-1
+3
-1
| --- Makefile.in | ||
| +++ Makefile.in | ||
| @@ -127,11 +127,13 @@ | ||
| 127 | 127 | --tag fossil:@FOSSIL_CI_PFX@ \ |
| 128 | 128 | --build-arg FSLURL=$(SRCTB) \ |
| 129 | 129 | $(DBFLAGS) @srcdir@ |
| 130 | 130 | rm -f $(SRCTB) |
| 131 | 131 | |
| 132 | -container-run: container-image | |
| 132 | +container-run: | |
| 133 | + docker image inspect fossil:@FOSSIL_CI_PFX@ > /dev/null 2>&1 || \ | |
| 134 | + $(MAKE) container-image | |
| 133 | 135 | docker run \ |
| 134 | 136 | --name fossil-@FOSSIL_CI_PFX@ \ |
| 135 | 137 | --cap-drop AUDIT_WRITE \ |
| 136 | 138 | --cap-drop CHOWN \ |
| 137 | 139 | --cap-drop FSETID \ |
| 138 | 140 |
| --- 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 |