stubby
stubby copied to clipboard
Instructions for Static Compilation?
I have compiled this statically on Alpine by:
- Manually downloading and compiling yaml (static libraries only)
- Installing
openssl-libs-static - Compiling
stubby, passing-DOPENSSL_CRYPTO_LIBRARY=/usr/lib/libcrypto.a -DOPENSSL_SSL_LIBRARY=/usr/lib/libssl.a -DCMAKE_EXE_LINKER_FLAGS=-staticto CMake.
This gets me a completely static binary, with musl. Omit -DCMAKE_EXE_LINKER_FLAGS=-static for static openssl and libyaml but dynamic libc.
An example Dockerfile to build static stubby is attached.
Oops, forgot to attach the Dockerfile. Attached to this comment now. This is just the builder. SHA256SUMS.txt Dockerfile.txt