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.

wyoung 2022-09-04 23:46 trunk
Commit b0c9c26a9c7fadb0d5a9eff9d47d99d469f0bc1876b24cd1e58532c459159ffd
+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 @@
118118
Makefile: @srcdir@/Makefile.in $(SRCDIR)/main.mk @AUTODEPS@
119119
@AUTOREMAKE@
120120
touch @builddir@/Makefile
121121
122122
# 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@
125128
126129
container-run: container-image
127130
docker run \
128131
--name fossil-@FOSSIL_CI_PFX@ \
129132
--cap-drop AUDIT_WRITE \
@@ -136,9 +139,5 @@
136139
--cap-drop SETFCAP \
137140
--cap-drop SETPCAP \
138141
--detach --publish 8080:8080 \
139142
$(DRFLAGS) fossil:@FOSSIL_CI_PFX@
140143
docker container logs fossil-@FOSSIL_CI_PFX@
141
-
142
-@srcdir@/Dockerfile: @srcdir@/Dockerfile.in @srcdir@/manifest.uuid
143
- @AUTOREMAKE@
144
-
145144
--- 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
+6 -4
--- auto.def
+++ auto.def
@@ -765,14 +765,16 @@
765765
} else {
766766
define EMCC_WRAPPER ""
767767
catch {exec rm -f tools/emcc.sh}
768768
}
769769
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.
773776
set ci [readfile "$::autosetup(srcdir)/manifest.uuid"]
774777
define FOSSIL_CI_PFX [string range $ci 0 11]
775
-make-template Dockerfile.in
776778
777779
make-template Makefile.in
778780
make-config-header autoconfig.h -auto {USE_* FOSSIL_*}
779781
--- 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

Keyboard Shortcuts

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