Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
~/bin/docker-setup
#!/bin/sh
#IMAGE='romster/crux-base:latest' # CRUX-3.1
IMAGE='romster/crux-base-3.2:latest'
set -e
if [ -z "${1}" ]; then
echo 'Missing portname.'
exit
fi
PKG_PORT="${1}"
mkdir -p $HOME/docker/crux/${PKG_PORT}/{packages,log,ports}
docker run -i -t \
-v /var/cache/ccache:/var/cache/ccache \
-v $HOME/docker/crux/${PKG_PORT}/log:/var/log/pkgbuild \
-v $HOME/docker/crux/${PKG_PORT}/packages:/var/ports/packages \
-v $HOME/docker/crux/${PKG_PORT}/ports:/usr/ports \
--name="${PKG_PORT}" "${IMAGE}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment