Created
February 21, 2020 11:05
-
-
Save isavcic/c44bf586bff18c4c52543110ddf657ff to your computer and use it in GitHub Desktop.
nsjail static build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
### Usage: | |
# docker run --rm -v $(pwd)/nsjail-static-build.sh:/nsjail-static-build.sh -v $(pwd):/out ubuntu:18.04 ./nsjail-static-build.sh | |
apt-get -y update && apt-get install -y \ | |
autoconf \ | |
bison \ | |
flex \ | |
gcc \ | |
g++ \ | |
git \ | |
libprotobuf-dev \ | |
libnl-route-3-dev \ | |
libtool \ | |
make \ | |
pkg-config \ | |
protobuf-compiler \ | |
upx | |
git clone https://github.com/google/nsjail.git | |
cd /nsjail | |
sed -i 's/^LDFLAGS\(.*\)/LDFLAGS\1 -static/' Makefile | |
make && mv /nsjail/nsjail /out && strip /out/nsjail && upx /out/nsjail |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment