Open willnorris opened 5 months ago
wow, 16 minutes to build the image for two platforms :(
I think ko would be faster than Docker build, but it seems like it is not possible to expose ports using ko ko-build/ko#472
EXPOSE is really just to document what ports are exposed mapped, right? But it's not really necessary to be able to map ports?
It also looks like ko really wants a simple main package that it can build. That would mean bypassing xcaddy entirely for our builds and having our own simple cmd. Which is totally fine, that's actually what I do for my personal website. I'll actually do that first as a separate PR.
It also looks like ko really wants a simple main package that it can build. That would mean bypassing xcaddy entirely for our builds and having our own simple cmd.
We also have our own container builder that is a stripped down version of ko and that allows to include multiple binaries https://github.com/tailscale/mkctr. ~But I think we don't have an option to include static files with that~
EXPOSE is really just to document what ports are exposed mapped, right? But it's not really necessary to be able to map ports?
That is my understanding, yes. Also, we don't expose ports for any of the other images we build (for example the k8s-operator that runs a server and listens on 443 and the tsrecorder)
This largely mirrors the default Caddy image. (I generally use chainguard images to limit dependencies, but stuck with alpine, since that's what Caddy uses for it's main images)
The GitHub Action is duplicated from what we have for
tailscale/golink
. I don't really know a lot of best practices for Dockerfiles, so am really looking for any input. I have this using thesimple.caddyfile
as the default config, which is easy to override.Updates #14