Skip to content

Commit 5a80cde

Browse files
authored
Merge pull request #36 from cybertec-postgresql/updateReadme
updated make & dockerfile
2 parents f550ee1 + 3173996 commit 5a80cde

2 files changed

Lines changed: 11 additions & 62 deletions

File tree

Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ PGBACKREST_VERSION ?= 2.50
1414
POSTGIS_VERSION ?= 34
1515
PACKAGER ?= dnf
1616
BUILD ?= 1
17+
ARCH ?= amd64
1718
IMAGE_TAG ?= $(BASEOS)-$(PGVERSION_FULL)-$(BUILD)
1819
POSTGIS_IMAGE_TAG ?= $(BASEOS)-$(PGVERSION_FULL)-$(POSTGIS_VERSION)-$(BUILD)
1920

@@ -76,7 +77,8 @@ postgres-build:
7677
--build-arg PGBACKREST_VERSION=$(PGBACKREST_VERSION) \
7778
--build-arg PATRONI_VERSION=$(PATRONI_VERSION) \
7879
--build-arg OLD_PG_VERSIONS="$(OLD_PG_VERSIONS)" \
79-
--build-arg PGVERSION=$(PGVERSION)
80+
--build-arg PGVERSION=$(PGVERSION) \
81+
--build-arg ARCH=$(ARCH)
8082

8183
postgres: postgres-build
8284

@@ -94,7 +96,8 @@ postgres-stage-build:
9496
--build-arg PGBACKREST_VERSION=$(PGBACKREST_VERSION) \
9597
--build-arg PATRONI_VERSION=$(PATRONI_VERSION) \
9698
--build-arg OLD_PG_VERSIONS="$(OLD_PG_VERSIONS)" \
97-
--build-arg PGVERSION=$(PGVERSION)
99+
--build-arg PGVERSION=$(PGVERSION) \
100+
--build-arg ARCH=$(ARCH)
98101

99102
postgres-stage: postgres-stage-build
100103

docker/postgres/Dockerfile

Lines changed: 6 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ ARG PG_SUPPORTED_VERSIONS="$PGVERSION"
1515
ARG PG_SUPPORTED_VERSIONS="$OLD_PG_VERSIONS $PGVERSION"
1616
ARG TIMESCALEDB="1.7.5 2.3.1 2.13.0"
1717
ARG ARCH
18+
1819
# Spilo-specific
1920
ENV SET_USER=REL3_0_0 \
2021
PLPROFILER=REL4_1 \
@@ -25,46 +26,7 @@ ENV SET_USER=REL3_0_0 \
2526
PG_TM_AUX_COMMIT=6c012d38a4c1b0ba4a36952d60b0ce3a22ac9c3d
2627

2728
# Get some Standard-Stuff
28-
RUN if [ "$BASEOS" = "ubi8" ] ; then \
29-
${PACKAGER} -y update && ${PACKAGER} -y install --nodocs --noplugins --setopt=install_weak_deps=0 \
30-
--setopt=skip_missing_names_on_install=False \
31-
openssh-clients \
32-
openssh-server \
33-
shadow-utils \
34-
tar \
35-
bzip2 \
36-
lz4 \
37-
python3 \
38-
python3-pip \
39-
python3-psycopg2 \
40-
# python3-psutil \
41-
# python3-requests \
42-
# python3-etcd \
43-
# python3-pyyaml \
44-
# python3-setuptools \
45-
git \
46-
patchutils \
47-
binutils \
48-
make \
49-
cmake \
50-
gcc \
51-
pam-devel \
52-
wget \
53-
mlocate \
54-
git-clang-format \
55-
openssl-devel \
56-
ccache \
57-
redhat-rpm-config \
58-
krb5-devel \
59-
busybox \
60-
jq \
61-
rsync \
62-
dumb-init \
63-
libicu \
64-
pgbackrest-${PGBACKREST_VERSION} \
65-
&& ${PACKAGER} -y clean all ; \
66-
else \
67-
${PACKAGER} -y update && ${PACKAGER} -y install --nodocs --noplugins --setopt=install_weak_deps=0 \
29+
RUN ${PACKAGER} -y update && ${PACKAGER} -y install --nodocs --noplugins --setopt=install_weak_deps=0 \
6830
--setopt=skip_missing_names_on_install=False \
6931
openssh-clients \
7032
openssh-server \
@@ -75,11 +37,6 @@ else \
7537
python3 \
7638
python3-pip \
7739
python3-psycopg2 \
78-
# python3-psutil \
79-
# python3-requests \
80-
# python3-etcd \
81-
# python3-pyyaml \
82-
# python3-setuptools \
8340
git \
8441
patchutils \
8542
binutils \
@@ -100,17 +57,16 @@ else \
10057
dumb-init \
10158
libicu \
10259
pgbackrest-${PGBACKREST_VERSION} \
103-
&& ${PACKAGER} -y clean all ; \
104-
fi
60+
&& ${PACKAGER} -y clean all;
10561

10662
# install etcdctl
107-
RUN ETCDVERSION=3.5.13 \
63+
RUN ETCDVERSION=3.5.13 && ARCH=amd64 \
10864
&& curl -L https://github.com/coreos/etcd/releases/download/v${ETCDVERSION}/etcd-v${ETCDVERSION}-linux-${ARCH}.tar.gz \
109-
| tar xz -C /bin --strip=1 --wildcards --no-anchored --no-same-owner etcdctl etcd;
65+
| tar xf -C /bin --strip=1 --wildcards --no-anchored --no-same-owner etcdctl etcd;
11066

11167
ENV PATHBACKUP = $PATH
11268

113-
COPY runit-2.1.2.tar.gz /package/runit-2.1.2.tar.gz
69+
RUN wget https://smarden.org/runit/runit-2.1.2.tar.gz -P /package/
11470

11571
# Install pam_oauth2.so
11672
#RUN #git clone -b $PAM_OAUTH2 --recurse-submodules https://github.com/zalando-pg/pam-oauth2.git \
@@ -188,16 +144,6 @@ RUN pip3 install 'PyYAML<6.0' setuptools pystache loader kazoo meld3 boto python
188144
&& ${PACKAGER} -y clean dbcache \
189145
&& ${PACKAGER} -y clean all;
190146

191-
# RUN ${PACKAGER} -y install --nodocs --noplugins --setopt=install_weak_deps=0 glibc-devel glibc-static \
192-
# && ${PACKAGER} -y clean all \
193-
# && mkdir -p /package \
194-
# && cd /package && tar -xvzf runit-2.1.2.tar.gz && rm runit-2.1.2.tar.gz \
195-
# && cd admin/runit-2.1.2 && package/install \
196-
# && ln -s /usr/local/bin/runsvdir /usr/bin/runsvdir \
197-
# && ${PACKAGER} -y remove $(rpm -qa "*-devel") \
198-
# && ${PACKAGER} -y autoremove \
199-
# && ${PACKAGER} -y clean all;
200-
201147
FROM scratch
202148

203149
ARG PGVERSION

0 commit comments

Comments
 (0)