Set up docker for arcade

This commit is contained in:
Daniel Plaisted 2018-11-07 17:56:31 -08:00
parent 56344d0cf0
commit cc776c8b44
19 changed files with 13 additions and 13 deletions

View file

@ -43,7 +43,7 @@ done
dockerbuild()
{
BUILD_COMMAND=/opt/code/run-build.sh $DIR/scripts/dockerrun.sh --non-interactive "$@"
BUILD_COMMAND=/opt/code/run-build.sh $DIR/eng/dockerrun.sh --non-interactive "$@"
}
# Check if we need to build in docker

22
old/scripts/dockerrun.sh → eng/dockerrun.sh Normal file → Executable file
View file

@ -38,7 +38,7 @@ while [[ $# > 0 ]]; do
echo ""
echo "Options:"
echo " <Dockerfile> The path to the Dockerfile to use to create the build container"
echo " <ImageName> The name of an existing Dockerfile folder under scripts/docker to use as the Dockerfile"
echo " <ImageName> The name of an existing Dockerfile folder under eng/docker to use as the Dockerfile"
echo " <Command> The command to run once inside the container (/opt/code is mapped to the repo root; defaults to nothing, which runs the default shell)"
exit 0
;;
@ -54,44 +54,44 @@ if [ -z "$DOCKERFILE" ]; then
if [ -z "$DOCKER_IMAGENAME" ]; then
if [ "$(uname)" == "Darwin" ]; then
echo "Defaulting to 'ubuntu' image for Darwin"
export DOCKERFILE=scripts/docker/ubuntu
export DOCKERFILE=eng/docker/ubuntu
elif [ "$(cat /etc/*-release | grep -cim1 ubuntu)" -eq 1 ]; then
echo "Detected current OS as Ubuntu, determining ubuntu version to use..."
if [ "$(cat /etc/*-release | grep -cim1 16.04)" -eq 1 ]; then
echo "using 'ubuntu.16.04' image"
export DOCKERFILE=scripts/docker/ubuntu.16.04
export DOCKERFILE=eng/docker/ubuntu.16.04
else
echo "using 'ubuntu' image"
export DOCKERFILE=scripts/docker/ubuntu
export DOCKERFILE=eng/docker/ubuntu
fi
elif [ "$(cat /etc/*-release | grep -cim1 centos)" -eq 1 ]; then
echo "Detected current OS as CentOS, using 'centos' image"
export DOCKERFILE=scripts/docker/centos
export DOCKERFILE=eng/docker/centos
elif [ "$(cat /etc/*-release | grep -cim1 rhel)" -eq 1 ]; then
echo "Detected current OS as rhel, using 'rhel' image"
export DOCKERFILE=scripts/docker/rhel
export DOCKERFILE=eng/docker/rhel
elif [ "$(cat /etc/*-release | grep -cim1 debian)" -eq 1 ]; then
echo "Detected current OS as Debian, using 'debian' image"
export DOCKERFILE=scripts/docker/debian
export DOCKERFILE=eng/docker/debian
elif [ "$(cat /etc/*-release | grep -cim1 fedora)" -eq 1 ]; then
echo "Detected current OS as Fedora, determining fedora version to use..."
if [ "$(cat /etc/*-release | grep -cim1 23)" -eq 1 ]; then
echo "using 'fedora.23' image"
export DOCKERFILE=scripts/docker/fedora.23
export DOCKERFILE=eng/docker/fedora.23
fi
elif [ "$(cat /etc/*-release | grep -cim1 opensuse)" -eq 1 ]; then
echo "Detected current OS as openSUSE, determining openSUSE version to use..."
if [ "$(cat /etc/*-release | grep -cim1 13.2)" -eq 1 ]; then
echo "using 'openSUSE.13.2' image"
export DOCKERFILE=scripts/docker/opensuse.13.2
export DOCKERFILE=eng/docker/opensuse.13.2
fi
else
echo "Unknown Linux Distro. Using 'ubuntu' image"
export DOCKERFILE=scripts/docker/ubuntu
export DOCKERFILE=eng/docker/ubuntu
fi
else
echo "Using requested image: $DOCKER_IMAGENAME"
export DOCKERFILE="scripts/docker/$DOCKER_IMAGENAME"
export DOCKERFILE="eng/docker/$DOCKER_IMAGENAME"
fi
fi

2
run-build.sh Normal file → Executable file
View file

@ -17,7 +17,7 @@ REPOROOT="$DIR"
ARCHITECTURE="x64"
source "$REPOROOT/scripts/common/_prettyprint.sh"
source "$REPOROOT/eng/_prettyprint.sh"
LINUX_PORTABLE_INSTALL_ARGS=
CUSTOM_BUILD_ARGS=