Blame docker-builder-i386/run.sh

10e43d
#!/bin/bash
10e43d
10e43d
SCRIPT_FILE=`realpath "$0"`
10e43d
SCRIPT_DIR=`dirname "$SCRIPT_FILE"`
10e43d
BASE_DIR=`dirname "$SCRIPT_DIR"`
10e43d
DATA_DIR="$BASE_DIR/docker-builder-data"
10e43d
10e43d
BUILD_DIR=$DATA_DIR/build
10e43d
10e43d
docker stop "builder-i386" || true
10e43d
docker rm "builder-i386" || true
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
10e43d
docker run -it \
10e43d
    --name "builder-i386" \
dd482a
    -v "$PACKET_BUILD_DIR:/build/packet" \
dd482a
    -v "$SCRIPT_BUILD_DIR:/build/script" \
10e43d
    -e PLATFORM=linux-i386 \
10e43d
    my/builder-i386 \
10e43d
    /build/script/common/manager.sh "$@"
10e43d