forked from deis/deis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·61 lines (48 loc) · 1.29 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#!/usr/bin/env bash
# fail on any command exiting non-zero
set -eo pipefail
if [[ -z $DOCKER_BUILD ]]; then
echo
echo "Note: this script is intended for use by the Dockerfile and not as a way to build the database locally"
echo
exit 1
fi
apk add --update-cache \
build-base \
curl \
file \
gcc \
git \
libffi-dev \
libxml2-dev \
libxslt-dev \
openssl-dev \
postgresql \
postgresql-client \
python-dev
# pv port.
curl http://dl-3.alpinelinux.org/alpine/edge/testing/x86_64/pv-1.6.0-r0.apk -o /tmp/pv-1.6.0-r0.apk
apk add /tmp/pv-1.6.0-r0.apk
/etc/init.d/postgresql stop || true
# install pip
curl -sSL https://raw.githubusercontent.com/pypa/pip/7.0.3/contrib/get-pip.py | python -
# install wal-e
cd /tmp
git clone https://github.com/wal-e/wal-e.git
# get a post-v0.8.0 commit which includes a busybox fix
cd /tmp/wal-e
git checkout c6dd4b1
pip install --disable-pip-version-check --no-cache-dir . oslo.config>=1.12.0
# python port of daemontools
pip install --disable-pip-version-check --no-cache-dir envdir
mkdir -p /etc/wal-e.d/env /etc/postgresql/main /var/lib/postgresql
chown -R root:postgres /etc/wal-e.d /etc/postgresql/main /var/lib/postgresql
# cleanup.
apk del --purge \
build-base \
gcc \
git
rm -rf /root/.cache \
/usr/share/doc \
/tmp/* \
/var/cache/apk/*