From 65167f839168c67f48ae8f7d8f7f1ba39720ed0d Mon Sep 17 00:00:00 2001 From: LunkSnee Date: Sun, 26 May 2024 12:07:57 -0600 Subject: [PATCH] Updating docker release to v3.2 of idrive bin (#5) * Update entrypoint.sh * Update README.md * Update docker-publish.yml * revert docker-publish.yml * Update .serviceLocation for v3 * Update Dockerfile to v3 * Update entrypoint.sh to v3 * Update README.md to v3 * Update README.md v3 correction change -i to -a for the command to setup cron --- .serviceLocation | 2 +- Dockerfile | 26 +++++++++----------------- README.md | 9 ++++----- entrypoint.sh | 3 ++- 4 files changed, 16 insertions(+), 24 deletions(-) diff --git a/.serviceLocation b/.serviceLocation index 40c5b3f..8238af2 100644 --- a/.serviceLocation +++ b/.serviceLocation @@ -1 +1 @@ -/work/IDriveForLinux/idriveIt +/opt/IDriveForLinux/idriveIt diff --git a/Dockerfile b/Dockerfile index c9d44e2..47cdc45 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,7 @@ FROM ubuntu:22.04 # Install packages -RUN apt-get update && apt-get -y install vim unzip curl libfile-spec-native-perl -RUN apt-get update && apt-get -y install build-essential sqlite3 perl-doc libdbi-perl libdbd-sqlite3-perl -RUN cpan install common::sense -RUN cpan install Linux::Inotify2 +RUN DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -y --no-install-recommends vim curl cron nano ca-certificates # Timezone (no prompt) ARG TZ "Europe/Vienna" @@ -14,29 +11,24 @@ RUN echo "$tz" > /etc/timezone RUN rm -f /etc/localtime RUN dpkg-reconfigure -f noninteractive tzdata -WORKDIR /work +WORKDIR /opt # Copy entrypoint script COPY entrypoint.sh . RUN chmod a+x entrypoint.sh -RUN curl -O https://www.idrivedownloads.com/downloads/linux/download-for-linux/LinuxScripts/IDriveForLinux.zip && \ - unzip IDriveForLinux.zip && \ - rm IDriveForLinux.zip - -WORKDIR /work/IDriveForLinux/scripts - -RUN chmod a+x *.pl - -RUN ln -s /work/IDriveForLinux/scripts/cron.pl /etc/idrivecron.pl - +RUN curl -O https://www.idrivedownloads.com/downloads/linux/download-for-linux/linux-bin/idriveforlinux.bin && \ + chmod a+x idriveforlinux.bin && \ + ./idriveforlinux.bin --install + +WORKDIR /opt/IDriveForLinux/bin COPY .serviceLocation . +RUN ln -s /opt/IDriveForLinux/bin/idrive /etc/idrivecron RUN mkdir -p /mnt/files && \ touch /mnt/files/idrivecron && \ chmod 755 /mnt/files/idrivecron && \ ln -s /mnt/files/idrivecron /etc/init.d/idrivecron - RUN mkdir -p /mnt/files && \ touch /mnt/files/idrivecrontab.json && \ ln -s /mnt/files/idrivecrontab.json /etc/idrivecrontab.json @@ -44,4 +36,4 @@ RUN mkdir -p /mnt/files && \ RUN mkdir -p /mnt/backup # Run the command on container startup -ENTRYPOINT ["/work/entrypoint.sh"] +ENTRYPOINT ["/opt/entrypoint.sh"] diff --git a/README.md b/README.md index b543d7e..79ad57c 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -# idrive -**IDrive Backup Docker image with v2.37** +# **IDrive Backup Docker image with v3.2** IDrive services persist, so no need to relogin after each restart of the container.\ It also works in TrueNAS SCALE. Configuration example is below. @@ -16,8 +15,8 @@ services: image: ghcr.io/lunksnee/idrive-persist:release restart: unless-stopped volumes: - - config:/work/IDriveForLinux/idriveIt - - dependencies:/work/IDriveForLinux/scripts/Idrivelib/dependencies + - config:/opt/IDriveForLinux/idriveIt + - dependencies:/opt/IDriveForLinux/scripts/Idrivelib/dependencies - files:/mnt/files - $BACKUPDIR:/mnt/backup:ro environment: @@ -56,6 +55,6 @@ leave everything else on default ## Configuration after first start Configure your IDrive account after first start. * Exec into container -* Run ````./account_setting.pl```` +* Run ````./idrive -a```` * Login with your account details and configure other basic settings. Important is your Backup location. * Now you should see your container in your IDrive dashboard. diff --git a/entrypoint.sh b/entrypoint.sh index a7cf4d1..fe3f527 100644 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,6 +1,7 @@ #!/bin/sh # Entrypoint for idrive -#/work/IDriveForLinux/scripts/check_for_update.pl silent +# running the update command may logout the user +# /opt/idriveforlinux.bin --update silent service idrivecron start