44 lines
1.8 KiB
Docker
44 lines
1.8 KiB
Docker
ARG DOCKER_BASEIMAGE
|
|
FROM ${DOCKER_BASEIMAGE}
|
|
|
|
ARG DOCKER_MAINTAINER
|
|
LABEL maintainer="${DOCKER_MAINTAINER}"
|
|
|
|
RUN set -e && DEBIAN_FRONTEND=noninteractive && \
|
|
apt-get update && \
|
|
apt-get install -y gnupg2 wget iputils-ping curl nano ca-certificates apt-transport-https lsb-release
|
|
|
|
RUN echo -e "\n====> Install PGSQL + Mysql" && \
|
|
rm -f /etc/apt/sources.list.d/pgdg.list && \
|
|
mkdir -p /usr/share/postgresql-common/pgdg && \
|
|
curl https://www.postgresql.org/media/keys/ACCC4CF8.asc -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc && \
|
|
echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
|
|
apt update && \
|
|
apt-cache search postgresql-client-* && \
|
|
apt install -y postgresql-client-12 postgresql-client-14 postgresql-client-16 postgresql-client-18 mysql-client
|
|
|
|
RUN echo -e "\n====> Install Mongo" && \
|
|
MONGO_VER=8.0 && \
|
|
curl -fsSL https://www.mongodb.org/static/pgp/server-8.0.asc | gpg -o /usr/share/keyrings/mongodb-server-8.0.gpg --dearmor && \
|
|
echo "deb [ arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-server-8.0.gpg ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/8.0 multiverse" | tee /etc/apt/sources.list.d/mongodb-org-8.0.list && \
|
|
apt update && \
|
|
apt install mongodb-database-tools -y
|
|
|
|
RUN echo -e "\n====> Install Mo" && \
|
|
curl -sSL https://git.io/get-mo -o mo && \
|
|
chmod +x mo && \
|
|
mv mo /usr/local/bin/
|
|
|
|
RUN echo -e "\n====> Install S3" && \
|
|
apt install rclone
|
|
|
|
RUN echo -e "\n====> Post install tasks" && \
|
|
mkdir -p /srv/backup && \
|
|
apt clean
|
|
|
|
COPY assets/ /
|
|
WORKDIR /usr/local/sbin
|
|
RUN chmod +x *.sh
|
|
|
|
ENTRYPOINT [ "/usr/local/sbin/backup.sh" ]
|