Skip to content

Instantly share code, notes, and snippets.

@joaompinto
Created March 28, 2023 21:11
Show Gist options
  • Save joaompinto/84d087fbd63233247d064e380aa19f6f to your computer and use it in GitHub Desktop.
Save joaompinto/84d087fbd63233247d064e380aa19f6f to your computer and use it in GitHub Desktop.
user level root on alpine
#!/bin/sh
unshare -Urm
cd /tmp/alpine/
mkdir tmp
mount --rbind /tmp tmp
mkdir proc
mount --rbind /proc proc
mkdir dev
mount --rbind /dev dev
mkdir sys
mount --rbind /sys sys
chroot . /bin/sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment