0
|
1 #!/bin/bash
|
|
2
|
|
3 set -ex
|
|
4
|
|
5 if [ "$1" != "Debug" -a "$1" != "Release" ]; then
|
|
6 echo "Please provide build type: Debug or Release"
|
|
7 exit -1
|
|
8 fi
|
|
9
|
|
10 if [ -t 1 ]; then
|
|
11 # TTY is available => use interactive mode
|
|
12 DOCKER_FLAGS='-i'
|
|
13 fi
|
|
14
|
|
15 ROOT_DIR=`dirname $(readlink -f $0)`/../../..
|
|
16
|
|
17 mkdir -p ${ROOT_DIR}/docker-build/
|
|
18
|
|
19 docker build \
|
8
|
20 -f ${ROOT_DIR}/Resources/Builders/DebianStable/Dockerfile-BuildEnvironment \
|
0
|
21 -t debian-stable-python-build .
|
|
22
|
|
23 docker run -t ${DOCKER_FLAGS} --rm \
|
|
24 --user $(id -u):$(id -g) \
|
|
25 -v ${ROOT_DIR}:/source:ro \
|
|
26 -v ${ROOT_DIR}/docker-build:/target:rw \
|
|
27 debian-stable-python-build \
|
8
|
28 bash /source/Resources/Builders/DebianStable/docker-internal.sh $1
|
0
|
29
|
|
30 ls -lR ${ROOT_DIR}/docker-build/
|