Blame docker/debian-7-64bit/run.sh

8fa589
#!/bin/bash
8fa589
8fa589
SCRIPT_DIR=$(cd `dirname "$0"`; pwd)
8fa589
BASE_DIR=`dirname "$SCRIPT_DIR"`
8fa589
BASE_DIR=`dirname "$BASE_DIR"`
8fa589
DATA_DIR="$BASE_DIR/docker-builder-data"
8fa589
BUILD_DIR=$DATA_DIR/build
8fa589
CONFIG_FILE="$BASE_DIR/config.sh"
8fa589
PACKET_BUILD_DIR="$BUILD_DIR/packet"
8fa589
SCRIPT_BUILD_DIR="$BUILD_DIR/script"
8fa589
if [ -f $CONFIG_FILE ]; then
8fa589
	source $CONFIG_FILE
8fa589
fi
8fa589
mkdir -p $PACKET_BUILD_DIR
8fa589
3b09af
export NATIVE_PLATFORM=debian
3b09af
if [ -z "$PLATFORM" ]; then
3b09af
    export PLATFORM=linux
3b09af
fi
3b09af
if [ -z "$TASK" ]; then
3b09af
    export TASK=builder-$NATIVE_PLATFORM
3b09af
fi
3b09af
export INSTANCE=$TASK-$PLATFORM$ARCH
8fa589
3b09af
docker stop "$INSTANCE" || true
3b09af
docker rm "$INSTANCE" || true
8fa589
docker run -it \
3b09af
    --name "$INSTANCE" \
8fa589
    --privileged=true \
8fa589
    $DOCKER_RUN_OPTIONS \
8fa589
    -v "$PACKET_BUILD_DIR:/build/packet" \
8fa589
    -v "$SCRIPT_BUILD_DIR:/build/script" \
3b09af
    -e NATIVE_PLATFORM="$NATIVE_PLATFORM" \
3b09af
    -e NATIVE_ARCH="$NATIVE_ARCH" \
3b09af
    -e PLATFORM="$PLATFORM" \
3b09af
    -e ARCH="$ARCH" \
3b09af
    -e THREADS="$THREADS" \
2ea947
    morevnaproject/builder-64:debian7 \
8fa589
    /build/script/common/manager.sh "$@"
8fa589