Last active
March 1, 2018 06:49
-
-
Save lpenz/8d2555bca4fc20ba0118 to your computer and use it in GitHub Desktop.
debootstrap a bare debian docker image
This file contains 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/bash | |
DIST=${1?no distribution specified} | |
ARCH=${2:amd64} | |
set -e -x | |
NAME=debian-${DIST}-${ARCH} | |
debootstrap --no-check-gpg "--arch=$ARCH" "$DIST" "$NAME" http://archive.debian.org/debian | |
tar -C "$NAME" -c . | docker import - "$USER/$NAME" | |
: "$USER/$NAME" built |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment