-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reorganize the code and switch to debian:stable-slim
- Loading branch information
Showing
4 changed files
with
19 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
FROM debian:buster | ||
FROM debian:stable-slim | ||
LABEL maintainer="[email protected]" \ | ||
ai.ix.repository="ix.ai/mariadb-backup" | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive TERM=linux | ||
|
||
COPY src/ /app | ||
VOLUME ["/backup"] | ||
WORKDIR /backup | ||
|
||
RUN chmod 755 /app/*.sh && \ | ||
groupadd -g 666 mybackup && \ | ||
useradd -u 666 -g 666 -d /backup -c "MariaDB Backup User" mybackup && \ | ||
apt-get update && \ | ||
apt-get -y dist-upgrade && \ | ||
apt-get install -y mydumper && \ | ||
apt-get -y --purge autoremove && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ | ||
RUN set -xeu; \ | ||
export DEBIAN_FRONTEND=noninteractive; \ | ||
export TERM=linux; \ | ||
groupadd -g 666 mybackup; \ | ||
useradd -u 666 -g 666 -d /backup -c "MariaDB Backup User" mybackup; \ | ||
apt-get update; \ | ||
apt-get -y dist-upgrade; \ | ||
apt-get install -y mydumper; \ | ||
apt-get -y --purge autoremove; \ | ||
apt-get clean; \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /var/cache/*; \ | ||
find /var/log -type f | while read f; do echo -ne '' > $f; done; | ||
|
||
VOLUME ["/backup"] | ||
WORKDIR /backup | ||
COPY mariadb-backup.sh /usr/local/bin/mariadb-backup | ||
|
||
ENV DB_PORT=3306 DB_USER=root | ||
|
||
ENTRYPOINT ["/app/mariadb-backup.sh"] | ||
ENTRYPOINT ["/usr/local/bin/mariadb-backup"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.