Skip to content

Commit

Permalink
Merge pull request #8 from maxkratz/feature/update-base-image-ubuntu-…
Browse files Browse the repository at this point in the history
…24-04

Updates base image to Ubuntu 24 04
  • Loading branch information
maxkratz committed Apr 27, 2024
2 parents e6f8b17 + 0af48bf commit ef4c5bc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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

0 comments on commit ef4c5bc

Please sign in to comment.