Skip to content

Commit a71c52f

Browse files
committed
Release 4.1.5 - See CHANGELOG.md
1 parent 4fc54e2 commit a71c52f

File tree

3 files changed

+144
-15
lines changed

3 files changed

+144
-15
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## 4.1.5 2024-10-29 <dave at tiredofit dot ca>
2+
3+
### Added
4+
- Pin to tiredofit/alpine:3.20-7.10.17
5+
- MySQL 8.4.3 client
6+
- MSSQL and MSODBC 18.4.1.1-1
7+
- Influx2 Client Version
8+
- AWS Client 1.35.13
9+
- Postgresql 17.x Support
10+
11+
112
## 4.1.4 2024-08-13 <dave at tiredofit dot ca>
213

314
Please note that if using encryption using a passphrase, you may be encountering issues with manual decryption. This release fixes that.

Dockerfile

Lines changed: 132 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,136 @@
11
ARG DISTRO=alpine
2-
ARG DISTRO_VARIANT=3.20
2+
ARG DISTRO_VARIANT=3.20-7.10.17
33

44
FROM docker.io/tiredofit/${DISTRO}:${DISTRO_VARIANT}
55
LABEL maintainer="Dave Conroy (github.com/tiredofit)"
66

77
### Set Environment Variables
88
ENV INFLUX1_CLIENT_VERSION=1.8.0 \
9-
INFLUX2_CLIENT_VERSION=2.7.3 \
10-
MSODBC_VERSION=18.3.2.1-1 \
11-
MSSQL_VERSION=18.3.1.1-1 \
12-
MYSQL_VERSION=mysql-8.4.0 \
9+
INFLUX2_CLIENT_VERSION=2.7.5 \
10+
MSODBC_VERSION=18.4.1.1-1 \
11+
MSSQL_VERSION=18.4.1.1-1 \
12+
MYSQL_VERSION=mysql-8.4.3 \
1313
MYSQL_REPO_URL=https://github.com/mysql/mysql-server \
14-
AWS_CLI_VERSION=1.32.113 \
14+
AWS_CLI_VERSION=1.35.13 \
1515
CONTAINER_ENABLE_MESSAGING=TRUE \
1616
CONTAINER_ENABLE_MONITORING=TRUE \
1717
IMAGE_NAME="tiredofit/db-backup" \
1818
IMAGE_REPO_URL="https://github.com/tiredofit/docker-db-backup/"
1919

2020
### Dependencies
21+
ENV POSTGRES_VERSION=${POSTGRES_VERSION:-"17.0"}
22+
23+
### Create User Accounts
2124
RUN source /assets/functions/00-container && \
2225
set -ex && \
26+
addgroup -g 70 postgres && \
27+
adduser -S -D -H -h /var/lib/postgresql -s /bin/sh -G postgres -u 70 postgres && \
28+
mkdir -p /var/lib/postgresql && \
29+
chown -R postgres:postgres /var/lib/postgresql && \
30+
\
31+
package update && \
32+
package upgrade && \
33+
package install .postgres-build-deps \
34+
bison \
35+
clang15 \
36+
coreutils \
37+
dpkg-dev \
38+
dpkg \
39+
flex \
40+
g++ \
41+
gcc \
42+
icu-dev \
43+
libc-dev \
44+
libedit-dev \
45+
libxml2-dev \
46+
libxslt-dev \
47+
linux-headers \
48+
llvm15-dev \
49+
lz4-dev \
50+
make \
51+
openldap-dev \
52+
openssl-dev \
53+
perl-dev \
54+
perl-ipc-run \
55+
perl-utils \
56+
python3-dev \
57+
tcl-dev \
58+
util-linux-dev \
59+
zlib-dev \
60+
zstd-dev \
61+
&& \
62+
\
63+
package install .postgres-run-deps \
64+
icu-data-full \
65+
libpq-dev \
66+
llvm15 \
67+
musl-locales \
68+
openssl \
69+
zstd-libs \
70+
&& \
71+
\
72+
mkdir -p /usr/src/postgres && \
73+
curl -sSL https://ftp.postgresql.org/pub/source/v$POSTGRES_VERSION/postgresql-$POSTGRES_VERSION.tar.bz2 | tar xvfj - --strip 1 -C /usr/src/postgres && \
74+
cd /usr/src/postgres && \
75+
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 && \
76+
grep '/var/run/postgresql' src/include/pg_config_manual.h.new && \
77+
mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h && \
78+
wget -O config/config.guess 'https://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=7d3d27baf8107b630586c962c057e22149653deb' && \
79+
wget -O config/config.sub 'https://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=7d3d27baf8107b630586c962c057e22149653deb' && \
80+
export LLVM_CONFIG="/usr/lib/llvm15/bin/llvm-config" && \
81+
export CLANG=clang-15 && \
82+
./configure \
83+
--build="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" \
84+
--prefix=/usr/local \
85+
--with-includes=/usr/local/include \
86+
--with-libraries=/usr/local/lib \
87+
--with-system-tzdata=/usr/share/zoneinfo \
88+
--with-pgport=5432 \
89+
--disable-rpath \
90+
--enable-integer-datetimes \
91+
--enable-tap-tests \
92+
--with-gnu-ld \
93+
--with-icu \
94+
--with-ldap \
95+
--with-libxml \
96+
--with-libxslt \
97+
--with-llvm \
98+
--with-lz4 \
99+
--with-openssl \
100+
--with-perl \
101+
--with-python \
102+
--with-tcl \
103+
--with-uuid=e2fs \
104+
--with-zstd \
105+
&& \
106+
make -j "$(nproc)" world && \
107+
make install-world && \
108+
make -j "$(nproc)" -C contrib && \
109+
make -C contrib/ install && \
110+
runDeps="$( \
111+
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
112+
| tr ',' '\n' \
113+
| sort -u \
114+
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
115+
| grep -v -e perl -e python -e tcl \
116+
)"; \
117+
package install .postgres-additional-deps \
118+
$runDeps \
119+
&& \
120+
\
121+
package remove \
122+
.postgres-build-deps \
123+
&& \
124+
package cleanup && \
125+
find /usr/local -name '*.a' -delete && \
126+
rm -rf \
127+
/root/.cache \
128+
/root/go \
129+
/usr/local/share/doc \
130+
/usr/local/share/man \
131+
/usr/src/* \
132+
&& \
133+
set -ex && \
23134
addgroup -S -g 10000 dbbackup && \
24135
adduser -S -D -H -u 10000 -G dbbackup -g "Tired of I.T! DB Backup" dbbackup && \
25136
\
@@ -55,8 +166,6 @@ RUN source /assets/functions/00-container && \
55166
openssl \
56167
pigz \
57168
pixz \
58-
postgresql16 \
59-
postgresql16-client \
60169
pv \
61170
py3-botocore \
62171
py3-colorama \
@@ -75,15 +184,24 @@ RUN source /assets/functions/00-container && \
75184
zstd \
76185
&& \
77186
\
78-
apkArch="$(uname -m)"; \
79-
case "$apkArch" in \
80-
x86_64) mssql=true ; mssql_arch=amd64; influx2=true ; influx_arch=amd64; ;; \
81-
arm64 | aarch64 ) mssql=true ; mssql_arch=amd64; influx2=true ; influx_arch=arm64 ;; \
187+
source /assets/functions/00-container && \
188+
cd /usr/src/ && \
189+
case "$(uname -m)" in \
190+
"x86_64" ) mssql=true ; mssql_arch=amd64; influx2=true ; influx_arch=amd64; ;; \
191+
"arm64" | "aarch64" ) mssql=true ; mssql_arch=arm64; influx2=true ; influx_arch=arm64 ;; \
82192
*) sleep 0.1 ;; \
83193
esac; \
84194
\
85-
if [[ $mssql = "true" ]] ; then curl -O https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/msodbcsql18_${MSODBC_VERSION}_${mssql_arch}.apk ; curl -O https://download.microsoft.com/download/3/5/5/355d7943-a338-41a7-858d-53b259ea33f5/mssql-tools18_${MSSQL_VERSION}_${mssql_arch}.apk ; echo y | apk add --allow-untrusted msodbcsql18_${MSODBC_VERSION}_${mssql_arch}.apk mssql-tools18_${MSSQL_VERSION}_${mssql_arch}.apk ; else echo >&2 "Detected non x86_64 or ARM64 build variant, skipping MSSQL installation" ; fi; \
86-
if [[ $influx2 = "true" ]] ; then curl -sSL https://dl.influxdata.com/influxdb/releases/influxdb2-client-${INFLUX2_CLIENT_VERSION}-linux-${influx_arch}.tar.gz | tar xvfz - --strip=1 -C /usr/src/ ; chmod +x /usr/src/influx ; mv /usr/src/influx /usr/sbin/ ; else echo >&2 "Unable to build Influx 2 on this system" ; fi ; \
195+
if [ "${mssql,,}" = "true" ] ; then \
196+
curl -sSLO https://download.microsoft.com/download/7/6/d/76de322a-d860-4894-9945-f0cc5d6a45f8/msodbcsql18_${MSODBC_VERSION}_${mssql_arch}.apk ; \
197+
curl -sSLO https://download.microsoft.com/download/7/6/d/76de322a-d860-4894-9945-f0cc5d6a45f8/mssql-tools18_${MSSQL_VERSION}_${mssql_arch}.apk ; \
198+
echo y | apk add --allow-untrusted msodbcsql18_${MSODBC_VERSION}_${mssql_arch}.apk mssql-tools18_${MSSQL_VERSION}_${mssql_arch}.apk ; \
199+
else \
200+
echo >&2 "Detected non x86_64 or ARM64 build variant, skipping MSSQL installation" ; \
201+
fi; \
202+
\
203+
if [ "${influx2,,}" = "true" ] ; then curl -sSL https://dl.influxdata.com/influxdb/releases/influxdb2-client-${INFLUX2_CLIENT_VERSION}-linux-${influx_arch}.tar.gz | tar xvfz - --strip=1 -C /usr/src/ ; chmod +x /usr/src/influx ; mv /usr/src/influx /usr/sbin/ ; else echo >&2 "Unable to build Influx 2 on this system" ; fi ; \
204+
sleep 30 && \
87205
clone_git_repo https://github.com/influxdata/influxdb "${INFLUX1_CLIENT_VERSION}" && \
88206
go build -o /usr/sbin/influxd ./cmd/influxd && \
89207
strip /usr/sbin/influxd && \

install/assets/functions/10-db-backup

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ backup_mysql() {
687687

688688
if [ "${backup_job_db_name,,}" = "all" ] ; then
689689
write_log debug "Preparing to back up everything except for information_schema and _* prefixes"
690-
db_names=$(run_as_user ${_mysql_prefix}mysql -h ${backup_job_db_host} -P ${backup_job_db_port} -u${backup_job_db_user} ${mysql_tls_args} ${backup_job_extra_opts} ${backup_job_extra_enumeration_opts} --batch -e "SHOW DATABASES;" | grep -v Database | grep -v schema )
690+
db_names="$(run_as_user ${_mysql_prefix}mysql -h ${backup_job_db_host} -P ${backup_job_db_port} -u${backup_job_db_user} ${mysql_tls_args} ${backup_job_extra_opts} ${backup_job_extra_enumeration_opts} --batch -e 'SHOW DATABASES;' | grep -v Database | grep -v schema )"
691691
if [ -n "${backup_job_db_name_exclude}" ] ; then
692692
db_names_exclusions=$(echo "${backup_job_db_name_exclude}" | tr ',' '\n')
693693
for db_exclude in ${db_names_exclusions} ; do

0 commit comments

Comments
 (0)