SECCLO Community

Is there a better way to build a container image for a Go application which doesn't involve Dockerfiles?

I don't want to remember that

COPY foo bar ./

has wildly different behavior depending on whether foo and/or bar are directories.

Ideally something that's smart enough to do the right Go-specific thing for caching and context uploads.

@filippo Ko doesn’t even require Docker locally!

@filippo For things which do need an underlying Linux distro and can’t be run distroless I’ve taken to building Alpine packages with melange and stuffing them into containers with apko

@erincandescent Nice! ko is close enough to what I want that I might just use that.

https://ko.build/deployment/#flyio

Ideally it would let me reuse the hosted Fly.io builders so I can upload source and not the much larger binary, but I guess that would be a lot of complexity and building locally makes more sense.

I do have cgo, but I also have good enough cross-compilers locally to build SQLite.

replies
0
announces
0
likes
0