Fossil SCM
Renamed Dockerfile.in back to Dockerfile so it can be used as-is on non-autosetup systems. Realized that we can pass the Fossil checkin hash prefix in as a build arg instead of regenerating the file on disk from auto.def. If you use the Dockerfile as-shipped, you get a "trunk" build, which risks a stale cache — it thinks it already has a tarball by that name and helpfully refuses to pull it again — but at least Windows users get *something* without hand-hacking the file.
Commit
b0c9c26a9c7fadb0d5a9eff9d47d99d469f0bc1876b24cd1e58532c459159ffd
Parent
ed50ceee0db1ad8…
4 files changed
+1
-1
-1
+5
-6
+6
-4
+1
-1
| --- a/Dockerfile | ||
| +++ b/Dockerfile | ||
| @@ -1 +1 @@ | ||
| 1 | -eum/repo.fossilaren't@FOSSIL_CI_PFX@ | |
| 1 | +eum/repo.fossilaren't |
| --- a/Dockerfile | |
| +++ b/Dockerfile | |
| @@ -1 +1 @@ | |
| 1 | eum/repo.fossilaren't@FOSSIL_CI_PFX@ |
| --- a/Dockerfile | |
| +++ b/Dockerfile | |
| @@ -1 +1 @@ | |
| 1 | eum/repo.fossilaren't |
D
Dockerfile.in
-1
| --- a/Dockerfile.in | ||
| +++ b/Dockerfile.in | ||
| @@ -1 +0,0 @@ | ||
| 1 | -eum/repo.fossilaren't@FOSSIL_CI_PFX@ |
| --- a/Dockerfile.in | |
| +++ b/Dockerfile.in | |
| @@ -1 +0,0 @@ | |
| 1 | eum/repo.fossilaren't@FOSSIL_CI_PFX@ |
| --- a/Dockerfile.in | |
| +++ b/Dockerfile.in | |
| @@ -1 +0,0 @@ | |
+5
-6
| --- Makefile.in | ||
| +++ Makefile.in | ||
| @@ -118,12 +118,15 @@ | ||
| 118 | 118 | Makefile: @srcdir@/Makefile.in $(SRCDIR)/main.mk @AUTODEPS@ |
| 119 | 119 | @AUTOREMAKE@ |
| 120 | 120 | touch @builddir@/Makefile |
| 121 | 121 | |
| 122 | 122 | # Container stuff |
| 123 | -container-image: @srcdir@/Dockerfile | |
| 124 | - docker build -t fossil:@FOSSIL_CI_PFX@ $(DBFLAGS) @srcdir@ | |
| 123 | +container-image: | |
| 124 | + docker build \ | |
| 125 | + --tag fossil:@FOSSIL_CI_PFX@ \ | |
| 126 | + --build-arg FSLVER=@FOSSIL_CI_PFX@ \ | |
| 127 | + $(DBFLAGS) @srcdir@ | |
| 125 | 128 | |
| 126 | 129 | container-run: container-image |
| 127 | 130 | docker run \ |
| 128 | 131 | --name fossil-@FOSSIL_CI_PFX@ \ |
| 129 | 132 | --cap-drop AUDIT_WRITE \ |
| @@ -136,9 +139,5 @@ | ||
| 136 | 139 | --cap-drop SETFCAP \ |
| 137 | 140 | --cap-drop SETPCAP \ |
| 138 | 141 | --detach --publish 8080:8080 \ |
| 139 | 142 | $(DRFLAGS) fossil:@FOSSIL_CI_PFX@ |
| 140 | 143 | docker container logs fossil-@FOSSIL_CI_PFX@ |
| 141 | - | |
| 142 | -@srcdir@/Dockerfile: @srcdir@/Dockerfile.in @srcdir@/manifest.uuid | |
| 143 | - @AUTOREMAKE@ | |
| 144 | - | |
| 145 | 144 |
| --- Makefile.in | |
| +++ Makefile.in | |
| @@ -118,12 +118,15 @@ | |
| 118 | Makefile: @srcdir@/Makefile.in $(SRCDIR)/main.mk @AUTODEPS@ |
| 119 | @AUTOREMAKE@ |
| 120 | touch @builddir@/Makefile |
| 121 | |
| 122 | # Container stuff |
| 123 | container-image: @srcdir@/Dockerfile |
| 124 | docker build -t fossil:@FOSSIL_CI_PFX@ $(DBFLAGS) @srcdir@ |
| 125 | |
| 126 | container-run: container-image |
| 127 | docker run \ |
| 128 | --name fossil-@FOSSIL_CI_PFX@ \ |
| 129 | --cap-drop AUDIT_WRITE \ |
| @@ -136,9 +139,5 @@ | |
| 136 | --cap-drop SETFCAP \ |
| 137 | --cap-drop SETPCAP \ |
| 138 | --detach --publish 8080:8080 \ |
| 139 | $(DRFLAGS) fossil:@FOSSIL_CI_PFX@ |
| 140 | docker container logs fossil-@FOSSIL_CI_PFX@ |
| 141 | |
| 142 | @srcdir@/Dockerfile: @srcdir@/Dockerfile.in @srcdir@/manifest.uuid |
| 143 | @AUTOREMAKE@ |
| 144 | |
| 145 |
| --- Makefile.in | |
| +++ Makefile.in | |
| @@ -118,12 +118,15 @@ | |
| 118 | Makefile: @srcdir@/Makefile.in $(SRCDIR)/main.mk @AUTODEPS@ |
| 119 | @AUTOREMAKE@ |
| 120 | touch @builddir@/Makefile |
| 121 | |
| 122 | # Container stuff |
| 123 | container-image: |
| 124 | docker build \ |
| 125 | --tag fossil:@FOSSIL_CI_PFX@ \ |
| 126 | --build-arg FSLVER=@FOSSIL_CI_PFX@ \ |
| 127 | $(DBFLAGS) @srcdir@ |
| 128 | |
| 129 | container-run: container-image |
| 130 | docker run \ |
| 131 | --name fossil-@FOSSIL_CI_PFX@ \ |
| 132 | --cap-drop AUDIT_WRITE \ |
| @@ -136,9 +139,5 @@ | |
| 139 | --cap-drop SETFCAP \ |
| 140 | --cap-drop SETPCAP \ |
| 141 | --detach --publish 8080:8080 \ |
| 142 | $(DRFLAGS) fossil:@FOSSIL_CI_PFX@ |
| 143 | docker container logs fossil-@FOSSIL_CI_PFX@ |
| 144 |
M
auto.def
+6
-4
| --- auto.def | ||
| +++ auto.def | ||
| @@ -765,14 +765,16 @@ | ||
| 765 | 765 | } else { |
| 766 | 766 | define EMCC_WRAPPER "" |
| 767 | 767 | catch {exec rm -f tools/emcc.sh} |
| 768 | 768 | } |
| 769 | 769 | |
| 770 | -# Insert a prefix of the checkin ID into the Dockerfile so repeated | |
| 771 | -# builds of this version generate and fetch the tarball only once, | |
| 772 | -# keeping it in the local Docker cache. | |
| 770 | +# Tag container builds with a prefix of the checkin ID of the version | |
| 771 | +# of Fossil each one contains. This not only allows multiple images | |
| 772 | +# to coexist and multiple containers to be created unamgiguosly from | |
| 773 | +# them, it also changes the URL we fetch the source tarball from, so | |
| 774 | +# repeated builds of a given version generate and fetch the source | |
| 775 | +# tarball once only, keeping it in the local Docker/Podman cache. | |
| 773 | 776 | set ci [readfile "$::autosetup(srcdir)/manifest.uuid"] |
| 774 | 777 | define FOSSIL_CI_PFX [string range $ci 0 11] |
| 775 | -make-template Dockerfile.in | |
| 776 | 778 | |
| 777 | 779 | make-template Makefile.in |
| 778 | 780 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 779 | 781 |
| --- auto.def | |
| +++ auto.def | |
| @@ -765,14 +765,16 @@ | |
| 765 | } else { |
| 766 | define EMCC_WRAPPER "" |
| 767 | catch {exec rm -f tools/emcc.sh} |
| 768 | } |
| 769 | |
| 770 | # Insert a prefix of the checkin ID into the Dockerfile so repeated |
| 771 | # builds of this version generate and fetch the tarball only once, |
| 772 | # keeping it in the local Docker cache. |
| 773 | set ci [readfile "$::autosetup(srcdir)/manifest.uuid"] |
| 774 | define FOSSIL_CI_PFX [string range $ci 0 11] |
| 775 | make-template Dockerfile.in |
| 776 | |
| 777 | make-template Makefile.in |
| 778 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 779 |
| --- auto.def | |
| +++ auto.def | |
| @@ -765,14 +765,16 @@ | |
| 765 | } else { |
| 766 | define EMCC_WRAPPER "" |
| 767 | catch {exec rm -f tools/emcc.sh} |
| 768 | } |
| 769 | |
| 770 | # Tag container builds with a prefix of the checkin ID of the version |
| 771 | # of Fossil each one contains. This not only allows multiple images |
| 772 | # to coexist and multiple containers to be created unamgiguosly from |
| 773 | # them, it also changes the URL we fetch the source tarball from, so |
| 774 | # repeated builds of a given version generate and fetch the source |
| 775 | # tarball once only, keeping it in the local Docker/Podman cache. |
| 776 | set ci [readfile "$::autosetup(srcdir)/manifest.uuid"] |
| 777 | define FOSSIL_CI_PFX [string range $ci 0 11] |
| 778 | |
| 779 | make-template Makefile.in |
| 780 | make-config-header autoconfig.h -auto {USE_* FOSSIL_*} |
| 781 |