mirror of
https://github.com/tiredofit/docker-db-backup.git
synced 2025-12-22 05:33:53 +01:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3e8585394d | ||
|
|
2e0c0d9248 |
13
CHANGELOG.md
13
CHANGELOG.md
@@ -1,3 +1,16 @@
|
|||||||
|
## 2.9.0 2021-10-15 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
|
### Added
|
||||||
|
- Postgresql 14 Support (compiled)
|
||||||
|
- MSSQL 17.8.1.1
|
||||||
|
|
||||||
|
|
||||||
|
## 2.8.2 2021-10-15 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
- Change to using aws cli from Alpine repositories (fixes #81)
|
||||||
|
|
||||||
|
|
||||||
## 2.8.1 2021-09-01 <dave at tiredofit dot ca>
|
## 2.8.1 2021-09-01 <dave at tiredofit dot ca>
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|||||||
119
Dockerfile
119
Dockerfile
@@ -1,14 +1,110 @@
|
|||||||
FROM tiredofit/alpine:3.14
|
FROM docker.io/tiredofit/alpine:3.14
|
||||||
|
|
||||||
### Set Environment Variables
|
### Set Environment Variables
|
||||||
ENV MSSQL_VERSION=17.5.2.1-1 \
|
ENV MSSQL_VERSION=17.8.1.1-1 \
|
||||||
CONTAINER_ENABLE_SCHEDULING=FALSE \
|
|
||||||
CONTAINER_ENABLE_MESSAGING=FALSE \
|
CONTAINER_ENABLE_MESSAGING=FALSE \
|
||||||
CONTAINER_ENABLE_MONITORING=TRUE \
|
CONTAINER_ENABLE_MONITORING=TRUE
|
||||||
CONTAINER_NAME=db-backup
|
|
||||||
|
|
||||||
### Dependencies
|
|
||||||
|
ENV LANG=en_US.utf8 \
|
||||||
|
PG_MAJOR=14 \
|
||||||
|
PG_VERSION=14.0 \
|
||||||
|
PGDATA=/var/lib/postgresql/data
|
||||||
|
|
||||||
|
|
||||||
|
### Create User Accounts
|
||||||
RUN set -ex && \
|
RUN set -ex && \
|
||||||
|
addgroup -g 70 postgres && \
|
||||||
|
adduser -S -D -H -h /var/lib/postgresql -s /bin/sh -G postgres -u 70 postgres && \
|
||||||
|
mkdir -p /var/lib/postgresql && \
|
||||||
|
chown -R postgres:postgres /var/lib/postgresql && \
|
||||||
|
\
|
||||||
|
### Install Dependencies
|
||||||
|
apk update && \
|
||||||
|
apk upgrade && \
|
||||||
|
apk add \
|
||||||
|
openssl \
|
||||||
|
&& \
|
||||||
|
\
|
||||||
|
apk add --no-cache --virtual .postgres-build-deps \
|
||||||
|
bison \
|
||||||
|
build-base \
|
||||||
|
coreutils \
|
||||||
|
dpkg-dev \
|
||||||
|
dpkg \
|
||||||
|
flex \
|
||||||
|
gcc \
|
||||||
|
icu-dev \
|
||||||
|
libc-dev \
|
||||||
|
libedit-dev \
|
||||||
|
libxml2-dev \
|
||||||
|
libxslt-dev \
|
||||||
|
linux-headers \
|
||||||
|
make \
|
||||||
|
openssl-dev \
|
||||||
|
perl-utils \
|
||||||
|
perl-ipc-run \
|
||||||
|
util-linux-dev \
|
||||||
|
zlib-dev \
|
||||||
|
&& \
|
||||||
|
\
|
||||||
|
### Build Postgresql
|
||||||
|
mkdir -p /usr/src/postgresql && \
|
||||||
|
curl -sSL "https://ftp.postgresql.org/pub/source/v$PG_VERSION/postgresql-$PG_VERSION.tar.bz2" | tar xvfj - --strip 1 -C /usr/src/postgresql && \
|
||||||
|
cd /usr/src/postgresql && \
|
||||||
|
# update "DEFAULT_PGSOCKET_DIR" to "/var/run/postgresql" (matching Debian)
|
||||||
|
# see https://anonscm.debian.org/git/pkg-postgresql/postgresql.git/tree/debian/patches/51-default-sockets-in-var.patch?id=8b539fcb3e093a521c095e70bdfa76887217b89f
|
||||||
|
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 && \
|
||||||
|
grep '/var/run/postgresql' src/include/pg_config_manual.h.new && \
|
||||||
|
mv src/include/pg_config_manual.h.new src/include/pg_config_manual.h && \
|
||||||
|
gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)" && \
|
||||||
|
# explicitly update autoconf config.guess and config.sub so they support more arches/libcs
|
||||||
|
wget -O config/config.guess 'https://git.savannah.gnu.org/cgit/config.git/plain/config.guess?id=7d3d27baf8107b630586c962c057e22149653deb' && \
|
||||||
|
wget -O config/config.sub 'https://git.savannah.gnu.org/cgit/config.git/plain/config.sub?id=7d3d27baf8107b630586c962c057e22149653deb' && \
|
||||||
|
./configure \
|
||||||
|
--build="$gnuArch" \
|
||||||
|
--enable-integer-datetimes \
|
||||||
|
--enable-thread-safety \
|
||||||
|
--enable-tap-tests \
|
||||||
|
--disable-rpath \
|
||||||
|
--with-uuid=e2fs \
|
||||||
|
--with-gnu-ld \
|
||||||
|
--with-pgport=5432 \
|
||||||
|
--with-system-tzdata=/usr/share/zoneinfo \
|
||||||
|
--prefix=/usr/local \
|
||||||
|
--with-includes=/usr/local/include \
|
||||||
|
--with-libraries=/usr/local/lib \
|
||||||
|
--with-openssl \
|
||||||
|
--with-libxml \
|
||||||
|
--with-libxslt \
|
||||||
|
--with-icu \
|
||||||
|
&& \
|
||||||
|
\
|
||||||
|
make -j "$(nproc)" world && \
|
||||||
|
make install-world && \
|
||||||
|
make -C contrib install && \
|
||||||
|
runDeps="$( \
|
||||||
|
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
|
||||||
|
| tr ',' '\n' \
|
||||||
|
| sort -u \
|
||||||
|
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||||
|
)" && \
|
||||||
|
apk add -t .postgres-additional-deps \
|
||||||
|
$runDeps \
|
||||||
|
&& \
|
||||||
|
\
|
||||||
|
### Cleanup
|
||||||
|
apk del .postgres-build-deps && \
|
||||||
|
cd / && \
|
||||||
|
rm -rf \
|
||||||
|
/usr/src/postgresql \
|
||||||
|
/usr/local/share/doc \
|
||||||
|
/usr/local/share/man && \
|
||||||
|
find /usr/local -name '*.a' -delete && \
|
||||||
|
rm -rf /var/cache/apk/* && \
|
||||||
|
\
|
||||||
|
### Dependencies
|
||||||
|
set -ex && \
|
||||||
apk update && \
|
apk update && \
|
||||||
apk upgrade && \
|
apk upgrade && \
|
||||||
apk add -t .db-backup-build-deps \
|
apk add -t .db-backup-build-deps \
|
||||||
@@ -16,21 +112,20 @@ RUN set -ex && \
|
|||||||
bzip2-dev \
|
bzip2-dev \
|
||||||
git \
|
git \
|
||||||
libarchive-dev \
|
libarchive-dev \
|
||||||
py3-pip \
|
|
||||||
xz-dev \
|
xz-dev \
|
||||||
&& \
|
&& \
|
||||||
\
|
\
|
||||||
apk add --no-cache -t .db-backup-run-deps \
|
apk add --no-cache -t .db-backup-run-deps \
|
||||||
bzip2 \
|
aws-cli \
|
||||||
|
bzip2 \
|
||||||
influxdb \
|
influxdb \
|
||||||
libarchive \
|
libarchive \
|
||||||
mariadb-client \
|
mariadb-client \
|
||||||
mongodb-tools \
|
mongodb-tools \
|
||||||
libressl \
|
libressl \
|
||||||
pigz \
|
pigz \
|
||||||
postgresql \
|
#postgresql \ # To reactivate when it appears in official repos with Alpine 3.15
|
||||||
postgresql-client \
|
#postgresql-client \ # To reactivate when it appears in official repos with Alpine 3.15
|
||||||
python3 \
|
|
||||||
redis \
|
redis \
|
||||||
sqlite \
|
sqlite \
|
||||||
xz \
|
xz \
|
||||||
@@ -59,8 +154,6 @@ RUN set -ex && \
|
|||||||
&& \
|
&& \
|
||||||
make && \
|
make && \
|
||||||
make install && \
|
make install && \
|
||||||
pip3 install --upgrade pip && \
|
|
||||||
pip3 install awscli && \
|
|
||||||
\
|
\
|
||||||
### Cleanup
|
### Cleanup
|
||||||
apk del .db-backup-build-deps && \
|
apk del .db-backup-build-deps && \
|
||||||
|
|||||||
2
LICENSE
2
LICENSE
@@ -1,6 +1,6 @@
|
|||||||
The MIT License (MIT)
|
The MIT License (MIT)
|
||||||
|
|
||||||
Copyright (c) 2020 Dave Conroy
|
Copyright (c) 2021 Dave Conroy
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
|
|
||||||
pkill bash
|
pkill bash
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user