-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·42 lines (34 loc) · 1.2 KB
/
Dockerfile
File metadata and controls
executable file
·42 lines (34 loc) · 1.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
ARG DEBIAN_VERSION=12-slim
FROM debian:${DEBIAN_VERSION}
LABEL org.opencontainers.image.authors="ottomatic"
USER root
ENV WORKDIR=/srv
RUN mkdir -p ${WORKDIR}
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
restic \
curl \
rclone \
jq \
bc \
wget \
gnupg2 \
lsb-release \
&& rm -rf /var/lib/apt/lists/*
## install specific postgresql-client version
RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
apt-get update && \
apt-get install -y \
postgresql-client-13 && \
# postgresql-client-15 && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
COPY --chmod=744 shell_modules ${WORKDIR}/shell_modules
COPY --chmod=744 main_postgresql_backup.sh ${WORKDIR}/main_postgresql_backup.sh
COPY --chmod=744 main_postgresql_restore.sh ${WORKDIR}/main_postgresql_restore.sh
COPY --chmod=744 entrypoint/entrypoint.sh /entrypoint.sh
RUN ln -s /entrypoint.sh /usr/bin/backup
ENTRYPOINT ["/entrypoint.sh"]
CMD ["cron_backup"]