Created
March 28, 2023 21:11
-
-
Save joaompinto/84d087fbd63233247d064e380aa19f6f to your computer and use it in GitHub Desktop.
user level root on alpine
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/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