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.