From 2664c8bf578963cfed92be590775aca039e74f6c Mon Sep 17 00:00:00 2001 From: Alex Thomae Date: Fri, 6 Sep 2019 13:09:57 +0200 Subject: [PATCH] Update to Debian Buster * switches to the `debian:buster` image * makes sure all the `RUN` commands are executed in one shot * adds environment variables needed for apt --- Dockerfile | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/Dockerfile b/Dockerfile index a45a96d..5c86833 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,30 +1,32 @@ -FROM debian:8 +FROM debian:buster MAINTAINER confirm IT solutions, dbarton # -# Add user. +# Ensure the correct variables are set for APT # -RUN \ - groupadd -g 666 mybackup && \ - useradd -u 666 -g 666 -d /backup -c "MySQL Backup User" mybackup +ENV DEBIAN_FRONTEND=noninteractive TERM=linux # -# Install required packages. +# Install start script. # -RUN \ - apt-get -y update && \ - apt-get -y install mydumper && \ - rm -rf /var/lib/apt/lists/* +COPY init.sh /init.sh # -# Install start script. +# Add user and install required packages. # -COPY init.sh /init.sh -RUN chmod 750 /init.sh +RUN \ + groupadd -g 666 mybackup && \ + useradd -u 666 -g 666 -d /backup -c "MySQL Backup User" mybackup && \ + apt-get -y update && \ + apt-get -y install mydumper && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \ + find /var/log -type f | while read f; do echo -ne '' > $f; done && \ + chmod 750 /init.sh # # Set container settings.