github.com/technosophos/deis@v1.7.1-0.20150915173815-f9005256004b/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 apk add --update-cache \ 15 build-base \ 16 curl \ 17 file \ 18 gcc \ 19 git \ 20 python-dev 21 22 # install etcdctl 23 curl -sSL -o /usr/local/bin/etcdctl https://s3-us-west-2.amazonaws.com/get-deis/etcdctl-v0.4.9 \ 24 && chmod +x /usr/local/bin/etcdctl 25 26 git clone https://github.com/jserver/mock-s3 /app/mock-s3 --depth 1 27 cd /app/mock-s3 28 #FIXME: This is a gisted patch to enable pseudo-handling of POST requests, otherwise wal-e crashes attempting to delete old wal segments 29 curl https://gist.githubusercontent.com/anonymous/c565f11a8d90d6e2d92b/raw/c5815f6c83aa5c2cfb7b0a34cfab4a075c97be16/mock-s3-post.diff|git apply 30 31 # install pip 32 curl -sSL https://raw.githubusercontent.com/pypa/pip/7.0.3/contrib/get-pip.py | python - 33 34 python setup.py install 35 36 # cleanup. 37 apk del --purge \ 38 build-base \ 39 gcc \ 40 git 41 rm -rf /var/cache/apk/* /tmp/*