first commit

This commit is contained in:
Antonio Calanducci 2024-07-03 09:34:04 +00:00
commit 338257abca
2 changed files with 26 additions and 0 deletions

13
Dockerfile Normal file
View File

@ -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"]

13
copy_files.sh Normal file
View File

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