Merge pull request #8 from maxkratz/feature/update-base-image-ubuntu-24-04

Updates base image to Ubuntu 24 04
This commit is contained in:
Maximilian Kratz 2024-04-27 07:15:00 +02:00 committed by GitHub
commit ef4c5bc742
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
# Use ubuntu 22.04
FROM ubuntu:22.04
# Use ubuntu 24.04
FROM ubuntu:24.04
LABEL maintainer="Max Kratz <account@maxkratz.com>"
ENV DEBIAN_FRONTEND=noninteractive
@ -18,20 +18,20 @@ RUN sudo locale-gen en_US.UTF-8
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8
# Install specific packages
RUN sudo apt-get install -y getmail6 python2
RUN sudo apt-get install -y getmail6 python3
RUN sudo git clone https://github.com/ralbear/IMAPbackup.git
# Remove apt lists (for storage efficiency)
RUN sudo rm -rf /var/lib/apt/lists/*
# Run list command
# RUN cd IMAPbackup && sudo python imapgrab.py -l -s $MAILHOST -u $MAILUSER -p $MAILPASSWORD
# RUN cd IMAPbackup && sudo python3 imapgrab38.py -l -s $MAILHOST -u $MAILUSER -p $MAILPASSWORD
# Assuming that folder is mount to /mnt, create mail-output folder
RUN sudo mkdir -p /mnt/mail
# Check if logging is enabled
CMD if [ "${MAILLOG}" = "TRUE" ]; \
then sudo mkdir -p /mnt/log && cd IMAPbackup && sudo python2 imapgrab.py -L imapgrab -d -v -M -f /mnt/mail/$MAILFOLDER -s $MAILHOST -u $MAILUSER -p $MAILPASSWORD -m "_ALL_" >> /mnt/log/$(date +'%Y-%m-%d_%H-%M-%S')_mail-backup.log; \
else cd IMAPbackup && sudo python2 imapgrab.py -L imapgrab -d -v -M -f /mnt/mail/$MAILFOLDER -s $MAILHOST -u $MAILUSER -p $MAILPASSWORD -m "_ALL_"; \
then sudo mkdir -p /mnt/log && cd IMAPbackup && sudo python3 imapgrab38.py -L imapgrab -d -v -M -f /mnt/mail/$MAILFOLDER -s $MAILHOST -u $MAILUSER -p $MAILPASSWORD -m "_ALL_" >> /mnt/log/$(date +'%Y-%m-%d_%H-%M-%S')_mail-backup.log; \
else cd IMAPbackup && sudo python3 imapgrab38.py -L imapgrab -d -v -M -f /mnt/mail/$MAILFOLDER -s $MAILHOST -u $MAILUSER -p $MAILPASSWORD -m "_ALL_"; \
fi