Building Containers Without Docker
blog.alexellis.io
blog.alexellis.io
`ko publish` does a `go build` and stuffs it in a base image, it even supports multi-arch images with `--platform=all`.
it also made me realize that the container IS such a beast, as it's a binary file format that is handled by a different linker-loader, that which takes such a binary file, extracts the runnable content and runs it in a mounted bundled filesystem.
For example if you were to have a desktop program as a single binary but you could tweak its installation process. You would need some kind of configuration interface on what parameters to tweak like MSI.
So Docker or even Kubernetes yaml files are the “installation files”, which otherwise your static Go binary would lack or would be provided as either a README.md or your own custom configuration format, which you have to document.
Sure enough the single Go binary is nice and I use this often for some cli tools, but if you integrate your tooling with other people and have to communicate, it makes it easier to agree on a common language (not programming language), but “configuration/deployment “ language, so that when you talk about: “this is a port”, everybody in the team can look up what “a port” is.
If you're not dependent on any externalities, you could just ship your executable over rsync to the server and you're all set.
Bow the question is who that "you" is. As the the one running it I have less control and a harder time updating those and depend more on the developer providing those.
In your case, it may be that these aren't considerations, and you'd prefer to just run the binary directly against your bare system.
EDIT: I guess the same happens if the package.json/lock file doesn't change.