github.com/sbuss/deis@v1.6.1/tests/fixtures/mock-store/build.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 the store mock component locally" 9 echo 10 exit 1 11 fi 12 13 # install required packages to build 14 apt-get update \ 15 && apt-get install -y build-essential git python-dev curl net-tools 16 17 # install etcdctl 18 curl -sSL -o /usr/local/bin/etcdctl https://s3-us-west-2.amazonaws.com/opdemand/etcdctl-v0.4.6 \ 19 && chmod +x /usr/local/bin/etcdctl 20 21 22 git clone https://github.com/jserver/mock-s3 /app/mock-s3 --depth 1 23 cd /app/mock-s3 24 #FIXME: This is a gisted patch to enable pseudo-handling of POST requests, otherwise wal-e crashes attempting to delete old wal segments 25 curl https://gist.githubusercontent.com/anonymous/c565f11a8d90d6e2d92b/raw/c5815f6c83aa5c2cfb7b0a34cfab4a075c97be16/mock-s3-post.diff|git apply 26 27 # install pip 28 curl -sSL https://raw.githubusercontent.com/pypa/pip/6.1.1/contrib/get-pip.py | python - 29 30 python setup.py install 31 32 # cleanup. indicate that python, libpq and libyanl are required packages. 33 apt-mark unmarkauto python && \ 34 apt-get remove -y --purge build-essential python-dev gcc cpp git && \ 35 apt-get autoremove -y --purge && \ 36 apt-get clean -y && \ 37 rm -Rf /usr/share/man /usr/share/doc && \ 38 rm -rf /tmp/* /var/tmp/* && \ 39 rm -rf /var/lib/apt/lists/* 40