-
Notifications
You must be signed in to change notification settings - Fork 374
Feature Request: Support static builds #342
Comments
This command doesn't work for me.
|
@caoruidong Are you attempting the build in a distribution that supports musl libc? When I did this I'm pretty sure I was working in an From the warning text it looks like you're linking to glibc. Also, the warning text you posted is warnings, where was the actual error? is that the whole output? |
@t3hmrman Oh, my fault. It is a warning and binary is still compiled out. |
No problem! Just to note I did get this working behind containerd's untrusted runtime system, but it didn't ultimately end up working, plan on making a blog post about it, but that should be separate from the meat of this ticket (making it easier/supported to do the static build at all), otherwise I'd just delete this ticket. |
+1 to add this to our Makefile |
Oh I do want to note that since I went through this the normal install (via a set of kubernetes resources) works for me now, so I didn't have to statically compile the runtime myself and put it on the machine. I also switched to Container Linux and don't use Container Linux anymore. I did write that blog post though, along with a repo for the static builds. |
Now that we support multiple branches, we changed how static-checks.sh compares branches. We now need a variable called $target_branch to make the correct comparison when testing a PR. Fixes: kata-containers#342. Signed-off-by: Salvador Fuentes <salvador.fuentes@intel.com>
Add support shareProcessNamespace. BTW, this commit only support shared pid namespace by sharing the infrastructure pause container's pid namespace with other containers, instead of creating a new pid namespace different from pause container. Fixes: kata-containers#342 Signed-off-by: fupan.lfp <fupan.lfp@antfin.com>
Running on Container Linux, I recently built
kata-runtime
in an Alpine linux container so I could use it as a static binary, all it required was changing the go build command to the following:go build --ldflags '-linkmode external -extldflags "-static"' -i -o $@
Could building statically be supported natively in the
Makefile
? Maybe a variable likeGO_BUILD_OPTS
could be introduce additional options, and then another variable or different target entirely for doing static builds?After moving the generated binary to the Container Linux machine, it seems to be working OK:
I haven't gotten to make a OCI bundle or run it behind containerd/frakti yet but will update when I do.
The text was updated successfully, but these errors were encountered: