-
Notifications
You must be signed in to change notification settings - Fork 118
/
Copy pathDockerfile.i386
77 lines (65 loc) · 1.89 KB
/
Dockerfile.i386
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FROM i386/ubuntu:bionic
ENV PGVERSION 10
RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris \
apt-get update \
&& DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris \
apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
git \
iproute2 \
libicu-dev \
libkrb5-dev \
libssl-dev \
libedit-dev \
libreadline-dev \
libpam-dev \
zlib1g-dev \
libxml2-dev \
libxslt1-dev \
libselinux1-dev \
make \
openssl \
python3-nose \
python3 \
python3-setuptools \
python3-psycopg2 \
python3-pip \
sudo \
tmux \
watch \
lsof \
psutils \
valgrind \
postgresql-common \
postgresql-server-dev-${PGVERSION} \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install pyroute2>=0.5.17
RUN pip3 install pipenv
# install Postgres 11 (current in bullseye), bypass initdb of a "main" cluster
RUN echo 'create_main_cluster = false' | sudo tee -a /etc/postgresql-common/createcluster.conf
RUN DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris \
apt-get update \
&& DEBIAN_FRONTEND=noninteractive TZ=Europe/Paris \
apt-get install -y --no-install-recommends postgresql-${PGVERSION} \
&& rm -rf /var/lib/apt/lists/*
RUN adduser --disabled-password --gecos '' docker
RUN adduser docker sudo
RUN adduser docker postgres
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
WORKDIR /usr/src/pg_auto_failover
COPY Makefile ./
COPY Makefile.azure ./
COPY Makefile.citus ./
COPY ./src/ ./src
RUN make -s clean && make -s install
COPY ./tests/ ./tests
COPY ./valgrind ./valgrind
RUN chmod a+w ./valgrind
# make installcheck needs to write in src/monitor (regressions.diffs and such)
RUN chmod -R a+rwx ./src/monitor
USER docker
ENV PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/lib/postgresql/${PGVERSION}/bin
ENV PG_AUTOCTL_DEBUG 1
ENV PGDATA /tmp/monitor
RUN pg_autoctl create monitor --auth trust --no-ssl