Skip to content

Instantly share code, notes, and snippets.

@PEMessage
Created June 12, 2025 16:52
Show Gist options
  • Save PEMessage/617a9dbd5cc81b052fab0327668b997e to your computer and use it in GitHub Desktop.
Save PEMessage/617a9dbd5cc81b052fab0327668b997e to your computer and use it in GitHub Desktop.
build-static-vmtouch.sh
#!/bin/sh
# Credit: https://gist.github.com/Saoneth/02f08d4714e6fc035e7017c74b3ef29a
docker run -t \
-e UID="$(id -u)" \
-e GID="$(id -g)" \
-v "$PWD":/w \
-w /tmp \
--rm \
alpine \
sh -c '
apk add gcc make musl-dev git perl &&
git clone https://github.com/hoytech/vmtouch.git
cd vmtouch &&
CFLAGS="-static" make &&
strip -s vmtouch &&
chown "$UID:$GID" vmtouch &&
chmod +x vmtouch &&
mv vmtouch /w/'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment