commit 338257abcae01d2a8aeb3638e65d593e54cfb83c Author: Antonio Calanducci Date: Wed Jul 3 09:34:04 2024 +0000 first commit diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0815c68 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM alpine:latest + +RUN apk update && \ + apk add --no-cache openssh-client nfs-utils zstd + +# RUN mkdir -p /mnt/nfs + +COPY copy_files.sh /usr/local/bin/copy_files.sh + +RUN chmod +x /usr/local/bin/copy_files.sh + +ENTRYPOINT ["/usr/local/bin/copy_files.sh"] + diff --git a/copy_files.sh b/copy_files.sh new file mode 100644 index 0000000..a8eb01e --- /dev/null +++ b/copy_files.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +FTP_SERVER=$FTP_SERVER +FTP_USER=$FTP_USER +FTP_PATH=$FTP_PATH +#NFS_SERVER=$NFS_SERVER +#NFS_PATH=$NFS_PATH + +# mount -t nfs $NFS_SERVER:$NFS_PATH /mnt/nfs + +sftp -i /root/.ssh/id_rsa -o StrictHostKeyChecking=no $FTP_USER@$FTP_SERVER:$FTP_PATH /mnt/beacon_data + +umount /mnt/beacon_data