Skip to content

Commit ac1b1b7

Browse files
committed
fix(build.sh): fail on errors in Dockerfile two-tier builds
Without "set -e" at the top of each build.sh script, errors would not propagate to the parent "docker build" process. In the case of controller, this was masking a missing dependency which is now fixed.
1 parent d423b19 commit ac1b1b7

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

build.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/usr/bin/env bash
22

3+
# fail on any command exiting non-zero
4+
set -eo pipefail
5+
36
if [[ -z $DOCKER_BUILD ]]; then
47
echo
58
echo "Note: this script is intended for use by the Dockerfile and not as a way to build the controller locally"
@@ -13,7 +16,7 @@ DEBIAN_FRONTEND=noninteractive
1316
# HACK: install git so we can install bacongobbler's fork of django-fsm
1417
# install openssh-client for temporary fleetctl wrapper
1518
apt-get update && \
16-
apt-get install -yq python-dev libpq-dev libyaml-dev git
19+
apt-get install -yq python-dev libffi-dev libpq-dev libyaml-dev git
1720

1821
# install pip
1922
curl -sSL https://raw.githubusercontent.com/pypa/pip/1.5.6/contrib/get-pip.py | python -
@@ -32,8 +35,8 @@ mkdir -p /templates && chown -R deis:deis /templates
3235
pip install -r /app/requirements.txt
3336

3437
# cleanup. indicate that python, libpq and libyanl are required packages.
35-
apt-mark unmarkauto python python-openssl libpq5 libpython2.7 libyaml-0-2 && \
36-
apt-get remove -y --purge python-dev gcc cpp libpq-dev libyaml-dev git && \
38+
apt-mark unmarkauto python python-openssl libpq5 libpython2.7 libffi6 libyaml-0-2 && \
39+
apt-get remove -y --purge python-dev gcc cpp libffi-dev libpq-dev libyaml-dev git && \
3740
apt-get autoremove -y --purge && \
3841
apt-get clean -y && \
3942
rm -Rf /usr/share/man /usr/share/doc && \

0 commit comments

Comments
 (0)