docker base image now is tweakable with env

This commit is contained in:
mudler
2016-02-06 15:05:02 +01:00
parent aa45473eda
commit 34857bb7a3
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
#!/bin/bash
set -e
ROOT="${ROOT:-$PWD}"
DOCKER_IMAGE="${DOCKER_IMAGE:-sabayon/builder-amd64}"
if [ $# -eq 0 ]
then
@@ -12,4 +13,4 @@ if [ "$(id -u)" != "0" ]; then
echo "!! If you are not running the script as root, your user should be in the docker group to use it. (sudo gpasswd -a $USER docker) !!"
fi
docker run --rm -v "$ROOT"/portage_artifacts:/usr/portage/packages -ti sabayon/builder-amd64 $@
docker run --rm -v "$ROOT"/portage_artifacts:/usr/portage/packages -ti $DOCKER_IMAGE $@
+2 -1
View File
@@ -5,6 +5,7 @@ entropysrv=$(mktemp)
createrepo=$(mktemp)
REPOSITORY_NAME="${REPOSITORY_NAME:-default}"
REPOSITORY_DESCRIPTION="${REPOSITORY_DESCRIPTION:-My Sabayon repository}"
DOCKER_IMAGE="${DOCKER_IMAGE:-sabayon/builder-amd64}"
EDITOR=cat
if [ "$(id -u)" != "0" ]; then
@@ -72,6 +73,6 @@ docker run --rm --entrypoint /bin/bash -e REPOSITORY=$REPOSITORY_NAME -e EDITOR=
-v $createrepo:/sabayon/bin/create_repo.sh \
-v $entropysrv:/etc/entropy/server.conf \
-v "$ROOT"/portage_artifacts:/usr/portage/packages \
-ti sabayon/builder-amd64 /sabayon/bin/create_repo.sh || true
-ti $DOCKER_IMAGE /sabayon/bin/create_repo.sh || true
rm -rf $createrepo
rm -rf $entropysrv