Skip to content

Commit 89b6176

Browse files
committed
Release 3.6.0 - See CHANGELOG.md
1 parent 22e1262 commit 89b6176

File tree

3 files changed

+106
-6
lines changed

3 files changed

+106
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 3.6.0 2022-11-21 <dave at tiredofit dot ca>
2+
3+
### Added
4+
- Postgresql 15 Support
5+
6+
17
## 3.5.6 2022-11-15 <dave at tiredofit dot ca>
28

39
### Changed

Dockerfile

Lines changed: 100 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ FROM docker.io/tiredofit/alpine:3.16
22
LABEL maintainer="Dave Conroy (github.com/tiredofit)"
33

44
### Set Environment Variables
5-
65
ENV INFLUX2_VERSION=2.4.0 \
76
MSSQL_VERSION=18.0.1.1-1 \
87
CONTAINER_ENABLE_MESSAGING=FALSE \
@@ -11,8 +10,105 @@ ENV INFLUX2_VERSION=2.4.0 \
1110
IMAGE_NAME="tiredofit/db-backup" \
1211
IMAGE_REPO_URL="https://github.com/tiredofit/docker-db-backup/"
1312

14-
### Dependencies
13+
ENV LANG=en_US.utf8 \
14+
PG_MAJOR=15 \
15+
PG_VERSION=15.1 \
16+
PGDATA=/var/lib/postgresql/data
17+
18+
### Create User Accounts
1519
RUN set -ex && \
20+
addgroup -g 70 postgres && \
21+
adduser -S -D -H -h /var/lib/postgresql -s /bin/sh -G postgres -u 70 postgres && \
22+
mkdir -p /var/lib/postgresql && \
23+
chown -R postgres:postgres /var/lib/postgresql && \
24+
\
25+
### Install Dependencies
26+
apk update && \
27+
apk upgrade && \
28+
apk add \
29+
openssl \
30+
&& \
31+
\
32+
apk add --no-cache --virtual .postgres-build-deps \
33+
bison \
34+
build-base \
35+
coreutils \
36+
dpkg-dev \
37+
dpkg \
38+
flex \
39+
gcc \
40+
icu-dev \
41+
libc-dev \
42+
libedit-dev \
43+
libxml2-dev \
44+
libxslt-dev \
45+
linux-headers \
46+
make \
47+
openssl-dev \
48+
perl-utils \
49+
perl-ipc-run \
50+
util-linux-dev \
51+
wget \
52+
zlib-dev \
53+
&& \
54+
\
55+
### Build Postgresql
56+
mkdir -p /usr/src/postgresql && \
57+
curl -sSL "https://ftp.postgresql.org/pub/source/v$PG_VERSION/postgresql-$PG_VERSION.tar.bz2" | tar xvfj - --strip 1 -C /usr/src/postgresql && \
58+
cd /usr/src/postgresql && \
59+
# update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian)
60+
# see https://anonscm.debian.org/git/pkg-postgresql/postgresql.git/tree/debian/patches/51-default-sockets-in-var.patch?id=8b539fcb3e093a521c095e70bdfa76887217b89f
61+
awk '$1 == "#define" && $2 == "DEFAULT_PGSOCKET_DIR" && $3 == "\"/tmp\"" { $3 = "\"/var/run/postgresql\""; print; next } { print }' src/include/pg_config_manual.h > src/include/pg_config_manual.h.new && \
62+
grep '/var/run/postgresql' src/include/pg_config_manual.h.new && \
63+
mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h && \
64+
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" && \
65+
# explicitly update autoconf config.guess and config.sub so they support more arches/libcs
66+
wget --inet4-only -O config/config.guess 'https://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=7d3d27baf8107b630586c962c057e22149653deb' && \
67+
wget --inet4-only -O config/config.sub 'https://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=7d3d27baf8107b630586c962c057e22149653deb' && \
68+
./configure \
69+
--build="$gnuArch" \
70+
--enable-integer-datetimes \
71+
--enable-thread-safety \
72+
--enable-tap-tests \
73+
--disable-rpath \
74+
--with-uuid=e2fs \
75+
--with-gnu-ld \
76+
--with-pgport=5432 \
77+
--with-system-tzdata=/usr/share/zoneinfo \
78+
--prefix=/usr/local \
79+
--with-includes=/usr/local/include \
80+
--with-libraries=/usr/local/lib \
81+
--with-openssl \
82+
--with-libxml \
83+
--with-libxslt \
84+
--with-icu \
85+
&& \
86+
\
87+
make -j "$(nproc)" world && \
88+
make install-world && \
89+
make -C contrib install && \
90+
runDeps="$( \
91+
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
92+
| tr ',' '\n' \
93+
| sort -u \
94+
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
95+
)" && \
96+
apk add -t .postgres-additional-deps \
97+
$runDeps \
98+
&& \
99+
\
100+
### Cleanup
101+
apk del .postgres-build-deps && \
102+
cd / && \
103+
rm -rf \
104+
/usr/src/postgresql \
105+
/usr/local/share/doc \
106+
/usr/local/share/man && \
107+
find /usr/local -name '*.a' -delete && \
108+
rm -rf /var/cache/apk/* && \
109+
\
110+
### Dependencies
111+
set -ex && \
16112
apk update && \
17113
apk upgrade && \
18114
apk add -t .db-backup-build-deps \
@@ -37,8 +133,8 @@ RUN set -ex && \
37133
mongodb-tools \
38134
libressl \
39135
pigz \
40-
postgresql \
41-
postgresql-client \
136+
#postgresql \
137+
#postgresql-client \
42138
pv \
43139
py3-cryptography \
44140
redis \

install/assets/functions/10-db-backup

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,6 @@ bootstrap_variables() {
8585
file_env 'S3_KEY_ID'
8686
file_env 'S3_KEY_SECRET'
8787
fi
88-
89-
9088
}
9189

9290
backup_couch() {

0 commit comments

Comments
 (0)