This PR bases the output Docker image on SCRATCH instead of alpine. Alpine is a great base, but for statically linked Go apps, we don't even need that.
I'm currently self-hosting using this updated image, it works identically as far as I can tell (e.g. no permission issues from the noroot user).
Sizes were calculated as:
# Build at current head
docker build -f Dockerfile.uptermd -t uptermd .
docker save uptermd -o uptermd.tar
# Checkout this PR
docker build -f Dockerfile.uptermd -t uptermd-new .
docker save uptermd-new -o uptermd-new.tar
uptermd.tar is ~26 MB, uptermd-new.tar is 21 MB.
The 5 MB isn't really that important when the image is already only 26 MB (as compared to some enormous Docker image people sling around), but I figured, why not?
This PR bases the output Docker image on
SCRATCH
instead of alpine. Alpine is a great base, but for statically linked Go apps, we don't even need that.I'm currently self-hosting using this updated image, it works identically as far as I can tell (e.g. no permission issues from the
noroot
user).Sizes were calculated as:
uptermd.tar
is ~26 MB,uptermd-new.tar
is 21 MB.The 5 MB isn't really that important when the image is already only 26 MB (as compared to some enormous Docker image people sling around), but I figured, why not?