5 export NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
7 # do not change this, it is already matched with the git repo file structure
8 DOCKER_FILE_DIR='./docker_files'
10 KAFKA_VERSION='0.8.1.1'
12 wget -q "http://www.namesdir.com/mirrors/apache/kafka/${KAFKA_VERSION}/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz" \
13 -O "./docker_files/kafka_${SCALA_VERSION}-${KAFKA_VERSION}.tgz"
15 # commands to run docker and docker-compose
16 DOCKER_COMPOSE_EXE='/opt/docker/docker-compose'
18 cd "${DOCKER_FILE_DIR}"
20 while ! ifconfig |grep "docker0" > /dev/null;
22 echo 'waiting for docker operational'
25 echo "prep any files with local configurations"
26 if ls __* 1> /dev/null 2>&1; then
27 IP_DOCKER0=$(ifconfig docker0 |grep "inet addr" | cut -d: -f2 |cut -d" " -f1)
28 TEMPLATES=$(ls -1 __*)
29 for TEMPLATE in $TEMPLATES
31 FILENAME=${TEMPLATE//_}
32 if [ ! -z "${IP_DOCKER0}" ]; then
33 sed -e "s/{{ ip.docker0 }}/${IP_DOCKER0}/" "$TEMPLATE" > "$FILENAME"
38 if [ -z "$MTU" ]; then
39 export MTU=$(ifconfig docker0 |grep MTU |sed -e 's/.*MTU://' -e 's/\s.*$//')
42 echo "starting docker operations"
43 ${DOCKER_COMPOSE_EXE} up -d --build