Blame docker-builder-i386/run.sh

10e43d
#!/bin/bash
10e43d
e7b20d
OLDDIR=`pwd`
e7b20d
SCRIPT_DIR=$(cd `dirname "$0"`; pwd)
e7b20d
cd "$OLDDIR"
10e43d
BASE_DIR=`dirname "$SCRIPT_DIR"`
10e43d
DATA_DIR="$BASE_DIR/docker-builder-data"
10e43d
10e43d
BUILD_DIR=$DATA_DIR/build
10e43d
dd482a
CONFIG_FILE="$BASE_DIR/config.sh"
dd482a
PACKET_BUILD_DIR="$BUILD_DIR/packet"
dd482a
SCRIPT_BUILD_DIR="$BUILD_DIR/script"
dd482a
if [ -f $CONFIG_FILE ]; then
dd482a
	source $CONFIG_FILE
dd482a
fi
dd482a
export PACKET_BUILD_DIR
dd482a
mkdir -p $PACKET_BUILD_DIR
dd482a
e71c94
docker stop "builder-i386" || true
e71c94
docker rm "builder-i386" || true
e71c94
10e43d
docker run -it \
10e43d
    --name "builder-i386" \
95dbc1
    $DOCKER_RUN_OPTIONS \
b0fa99
    --privileged=true \
dd482a
    -v "$PACKET_BUILD_DIR:/build/packet" \
dd482a
    -v "$SCRIPT_BUILD_DIR:/build/script" \
10e43d
    -e PLATFORM=linux-i386 \
10e43d
    my/builder-i386 \
223f41
    setarch i686 /build/script/common/manager.sh "$@"
10e43d