Skip to content

Instantly share code, notes, and snippets.

@rms1000watt
Created March 18, 2019 00:04
Show Gist options
  • Save rms1000watt/1f3593bd3d4d31c9f4dfac30830d48f2 to your computer and use it in GitHub Desktop.
Save rms1000watt/1f3593bd3d4d31c9f4dfac30830d48f2 to your computer and use it in GitHub Desktop.
Add busybox (shell) into from scratch container as volume mount for temporary shell
#!/usr/bin/env bash
if [[ ! -d "busybox" ]]; then
curl -o busybox.tar.xz -L https://github.com/docker-library/busybox/blob/82bc0333a9ae148fbb4246bcbff1487b3fc0c510/uclibc/busybox.tar.xz?raw=true
mkdir busybox
tar -zxvf busybox.tar.xz -C busybox
rm busybox.tar.xz
fi
docker run -it --rm --entrypoint sh -v $(pwd)/busybox/bin:/bin hello-world
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment