Skip to content

Commit e2f9ec9

Browse files
committed
Postgres 18, MySQL 8.4.8 MSSQL 18.6.1 AWS CLI 1.44.56
1 parent 016c5c1 commit e2f9ec9

5 files changed

Lines changed: 148 additions & 13 deletions

File tree

Dockerfile

Lines changed: 116 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,127 @@ LABEL maintainer="Dave Conroy (github.com/tiredofit)"
66

77
ENV INFLUX1_CLIENT_VERSION=1.8.0 \
88
INFLUX2_CLIENT_VERSION=2.7.5 \
9-
MSODBC_VERSION=18.4.1.1-1 \
10-
MSSQL_VERSION=18.4.1.1-1 \
11-
MYSQL_VERSION=mysql-8.4.4 \
9+
MSODBC_VERSION=18.6.1.1-1 \
10+
MSSQL_VERSION=18.6.1.1-1 \
11+
MYSQL_VERSION=mysql-8.4.8 \
1212
MYSQL_REPO_URL=https://github.com/mysql/mysql-server \
13-
AWS_CLI_VERSION=1.36.40 \
13+
AWS_CLI_VERSION=1.44.56 \
14+
POSTGRES_VERSION=18.3 \
1415
CONTAINER_ENABLE_MESSAGING=TRUE \
1516
CONTAINER_ENABLE_MONITORING=TRUE \
1617
IMAGE_NAME="tiredofit/db-backup" \
1718
IMAGE_REPO_URL="https://github.com/tiredofit/docker-db-backup/"
1819

1920
RUN source /assets/functions/00-container && \
21+
set -ex && \
22+
addgroup -g 70 postgres && \
23+
adduser -S -D -H -h /var/lib/postgresql -s /bin/sh -G postgres -u 70 postgres && \
24+
mkdir -p /var/lib/postgresql && \
25+
chown -R postgres:postgres /var/lib/postgresql && \
26+
\
27+
package update && \
28+
package upgrade && \
29+
package install .postgres-build-deps \
30+
bison \
31+
clang19 \
32+
coreutils \
33+
dpkg-dev \
34+
dpkg \
35+
flex \
36+
g++ \
37+
gcc \
38+
icu-dev \
39+
libc-dev \
40+
libedit-dev \
41+
libxml2-dev \
42+
libxslt-dev \
43+
linux-headers \
44+
llvm19-dev \
45+
lz4-dev \
46+
make \
47+
openldap-dev \
48+
openssl-dev \
49+
perl-dev \
50+
perl-ipc-run \
51+
perl-utils \
52+
python3-dev \
53+
tcl-dev \
54+
util-linux-dev \
55+
zlib-dev \
56+
zstd-dev \
57+
&& \
58+
\
59+
package install .postgres-run-deps \
60+
icu-data-full \
61+
libpq-dev \
62+
llvm19 \
63+
musl-locales \
64+
openssl \
65+
zstd-libs \
66+
&& \
67+
\
68+
mkdir -p /usr/src/postgres && \
69+
curl -sSL https://ftp.postgresql.org/pub/source/v$POSTGRES_VERSION/postgresql-$POSTGRES_VERSION.tar.bz2 | tar xvfj - --strip 1 -C /usr/src/postgres && \
70+
cd /usr/src/postgres && \
71+
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 && \
72+
grep '/var/run/postgresql' src/include/pg_config_manual.h.new && \
73+
mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h && \
74+
wget -O config/config.guess 'https://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=7d3d27baf8107b630586c962c057e22149653deb' && \
75+
wget -O config/config.sub 'https://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=7d3d27baf8107b630586c962c057e22149653deb' && \
76+
export LLVM_CONFIG="/usr/lib/llvm19/bin/llvm-config" && \
77+
export CLANG=clang-19 && \
78+
./configure \
79+
--build="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
80+
--prefix=/usr/local \
81+
--with-includes=/usr/local/include \
82+
--with-libraries=/usr/local/lib \
83+
--with-system-tzdata=/usr/share/zoneinfo \
84+
--with-pgport=5432 \
85+
--disable-rpath \
86+
--enable-integer-datetimes \
87+
--enable-tap-tests \
88+
--with-gnu-ld \
89+
--with-icu \
90+
--with-ldap \
91+
--with-libxml \
92+
--with-libxslt \
93+
--with-llvm \
94+
--with-lz4 \
95+
--with-openssl \
96+
--with-perl \
97+
--with-python \
98+
--with-tcl \
99+
--with-uuid=e2fs \
100+
--with-zstd \
101+
&& \
102+
make -j "$(nproc)" world && \
103+
make install-world && \
104+
make -j "$(nproc)" -C contrib && \
105+
make -C contrib/ install && \
106+
runDeps="$( \
107+
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
108+
| tr ',' '\n' \
109+
| sort -u \
110+
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
111+
| grep -v -e perl -e python -e tcl \
112+
)"; \
113+
package install .postgres-additional-deps \
114+
$runDeps \
115+
&& \
116+
\
117+
package remove \
118+
.postgres-build-deps \
119+
&& \
120+
package cleanup && \
121+
find /usr/local -name '*.a' -delete && \
122+
rm -rf \
123+
/root/.cache \
124+
/root/go \
125+
/usr/local/share/doc \
126+
/usr/local/share/man \
127+
/usr/src/* \
128+
&& \
129+
\
20130
set -ex && \
21131
addgroup -S -g 10000 dbbackup && \
22132
adduser -S -D -H -u 10000 -G dbbackup -g "Tired of I.T! DB Backup" dbbackup && \
@@ -55,8 +165,6 @@ RUN source /assets/functions/00-container && \
55165
openssl \
56166
pigz \
57167
pixz \
58-
postgresql17 \
59-
postgresql17-client \
60168
pv \
61169
py3-botocore \
62170
py3-colorama \
@@ -82,8 +190,8 @@ RUN source /assets/functions/00-container && \
82190
esac; \
83191
\
84192
if [ "${mssql,,}" = "true" ] ; then \
85-
curl -sSLO https://download.microsoft.com/download/7/6/d/76de322a-d860-4894-9945-f0cc5d6a45f8/msodbcsql18_${MSODBC_VERSION}_${mssql_arch}.apk ; \
86-
curl -sSLO https://download.microsoft.com/download/7/6/d/76de322a-d860-4894-9945-f0cc5d6a45f8/mssql-tools18_${MSSQL_VERSION}_${mssql_arch}.apk ; \
193+
curl -sSLO https://download.microsoft.com/download/9dcab408-e0d4-4571-a81a-5a0951e3445f/msodbcsql18_${MSODBC_VERSION}_${mssql_arch}.apk ; \
194+
curl -sSLO https://download.microsoft.com/download/b60bb8b6-d398-4819-9950-2e30cf725fb0/mssql-tools18_${MSSQL_VERSION}_${mssql_arch}.apk ; \
87195
echo y | apk add --allow-untrusted msodbcsql18_${MSODBC_VERSION}_${mssql_arch}.apk mssql-tools18_${MSSQL_VERSION}_${mssql_arch}.apk ; \
88196
else \
89197
echo >&2 "Detected non x86_64 or ARM64 build variant, skipping MSSQL installation" ; \

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2025 Dave Conroy
3+
Copyright (c) 2026 Dave Conroy
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111

1212
## About
1313

14+
>> This is being migrated to the nfrastack/container-db-backup namespace - A new nfrastack release will come in April 2026
15+
1416
This will build a container for backing up multiple types of DB Servers
1517

1618
Backs up CouchDB, InfluxDB, MySQL/MariaDB, Microsoft SQL, MongoDB, Postgres, Redis servers.
@@ -363,7 +365,7 @@ If `DEFAULT_BACKUP_LOCATION` = `blobxfer` then the following options are used:.
363365
| `DEFAULT_BLOBXFER_REMOTE_PATH` | Remote Azure path | `/docker-db-backup` | x |
364366
| `DEFAULT_BLOBXFER_MODE` | Azure Storage mode e.g. `auto`, `file`, `append`, `block` or `page` | `auto` | x |
365367

366-
- When `DEFAULT_BLOBXFER_MODE` is set to auto it will use blob containers by default. If the `DEFAULT_BLOBXFER_REMOTE_PATH` path does not exist a blob container with that name will be created.
368+
- When `DEFAULT_BLOBXFER_MODE` is set to auto it will use blob containers by default. If the `DEFAULT_BLOBXFER_REMOTE_PATH` path does not exist a blob container with that name will be created.
367369

368370
> This service uploads files from backup targed directory `DEFAULT_FILESYSTEM_PATH`.
369371
> If the a cleanup configuration in `DEFAULT_CLEANUP_TIME` is defined, the remote directory on Azure storage will also be cleaned automatically.
@@ -646,7 +648,7 @@ If `DB01_BACKUP_LOCATION` = `blobxfer` then the following options are used:.
646648
| `DB01_BLOBXFER_REMOTE_PATH` | Remote Azure path | `/docker-db-backup` | x |
647649
| `DB01_BLOBXFER_REMOTE_MODE` | Azure Storage mode e.g. `auto`, `file`, `append`, `block` or `page` | `auto` | x |
648650

649-
- When `DEFAULT_BLOBXFER_MODE` is set to auto it will use blob containers by default. If the `DEFAULT_BLOBXFER_REMOTE_PATH` path does not exist a blob container with that name will be created.
651+
- When `DEFAULT_BLOBXFER_MODE` is set to auto it will use blob containers by default. If the `DEFAULT_BLOBXFER_REMOTE_PATH` path does not exist a blob container with that name will be created.
650652

651653
> This service uploads files from backup directory `DB01_BACKUP_FILESYSTEM_PATH`.
652654
> If the a cleanup configuration in `DB01_CLEANUP_TIME` is defined, the remote directory on Azure storage will also be cleaned automatically.

examples/compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ services:
22
example-db:
33
hostname: example-db-host
44
container_name: example-db
5-
image: tiredofit/mariadb:10.11
5+
image: docker.io/nfrastack/mariadb:11.8
66
ports:
77
- 3306:3306
88
volumes:
9-
- ./db:/var/lib/mysql
9+
- ./db:/data
1010
environment:
1111
- ROOT_PASS=examplerootpassword
1212
- DB_NAME=example

install/etc/cont-init.d/10-db-backup

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,31 @@ prepare_service 03-monitoring
66
PROCESS_NAME="db-backup"
77
output_off
88

9+
cat <<EOF
10+
11+
*******************************************************************************************
12+
* *
13+
* END OF LIFE NOTICE MARCH 12 , 2026 *
14+
* tiredofit/db-backup *
15+
* *
16+
* This image is no longer maintained as of and will not receive updates. *
17+
* *
18+
* A successor image is available at: *
19+
* *
20+
* Repository | Documentation: *
21+
* - https://github.com/nfrastack/container-db-backup *
22+
* *
23+
* Image Registries: *
24+
* - https://hub.docker.com/r/nfrastack/db-backup *
25+
* - https://github.com/nfrastack/container-db-backup/pkgs/container/container-db-backup *
26+
* *
27+
* Please visit https://nfrastack.com for more information. *
28+
* *
29+
*******************************************************************************************
30+
31+
EOF
32+
33+
sleep 15
934
setup_mode
1035
db_backup_container_init
1136
create_schedulers backup

0 commit comments

Comments
 (0)