github.com/amrnt/deis@v1.3.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
    23  
    24  cd /app/mock-s3
    25  
    26  # install pip
    27  curl -sSL https://raw.githubusercontent.com/pypa/pip/1.5.6/contrib/get-pip.py | python -
    28  
    29  python setup.py install
    30  
    31  # cleanup. indicate that python, libpq and libyanl are required packages.
    32  apt-mark unmarkauto python && \
    33    apt-get remove -y --purge build-essential python-dev gcc cpp git && \
    34    apt-get autoremove -y --purge && \
    35    apt-get clean -y && \
    36    rm -Rf /usr/share/man /usr/share/doc && \
    37    rm -rf /tmp/* /var/tmp/* && \
    38    rm -rf /var/lib/apt/lists/*
    39