github.com/greenboxal/deis@v1.12.1/mesos/build-marathon.sh (about) 1 #!/usr/bin/env bash 2 3 # fail on any command exiting non-zero 4 set -eo pipefail 5 6 if [[ -z $DOCKER_BUILD ]]; then 7 echo 8 echo "Note: this script is intended for use by the Dockerfile and not as a way to build zoopeeper locally" 9 echo 10 exit 1 11 fi 12 13 apt-get update && apt-get install -y curl 14 15 cd /tmp 16 17 mkdir -p /opt 18 19 curl -sSL "https://github.com/mesosphere/marathon/archive/v$MARATHON_VERSION.tar.gz" | tar -xzf - -C /opt 20 ln -s "/opt/marathon-$MARATHON_VERSION" /app 21 ln -s "/opt/marathon-$MARATHON_VERSION" /marathon 22 23 mkdir -p "/opt/marathon-$MARATHON_VERSION/target" 24 ln -s "/marathon-assembly.jar" "/opt/marathon-$MARATHON_VERSION/target/marathon-assembly-$MARATHON_VERSION.jar" 25 26 apt-get autoremove -y --purge && \ 27 apt-get clean -y && \ 28 rm -Rf /usr/share/man /usr/share/doc && \ 29 rm -rf /tmp/* /var/tmp/* && \ 30 rm -rf /var/lib/apt/lists/*