Skip to content

Instantly share code, notes, and snippets.

View JamesBalazs's full-sized avatar
🏝️
Dev island castaway

James Balazs JamesBalazs

🏝️
Dev island castaway
View GitHub Profile
@JamesBalazs
JamesBalazs / container.sh
Last active August 10, 2021 17:42
Create a container "the hard way"
export CONTAINER_ROOT_FOLDER=/tmp/our_container
mkdir -p ${CONTAINER_ROOT_FOLDER}/newroot
cp ./entrypoint.sh ${CONTAINER_ROOT_FOLDER}/entrypoint.sh
cd ${CONTAINER_ROOT_FOLDER}
wget https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/x86_64/alpine-minirootfs-3.13.1-x86_64.tar.gz
tar xvf alpine-minirootfs-3.13.1-x86_64.tar.gz -C newroot
unshare --kill-child -Urmp ${CONTAINER_ROOT_FOLDER}/entrypoint.sh

Keybase proof

I hereby claim:

  • I am jamesbalazs on github.
  • I am jamesbalazs (https://keybase.io/jamesbalazs) on keybase.
  • I have a public key ASB3cj253P_mqORFZTssz_JffASbdWsQdxIK9hmTh0n-UQo

To claim this, I am signing this object: