This application is designed to run non-stop, polling an FTP server of your choosing, looking for any new files that get added. This is very useful if you have a file server that regularly grabs updates to files which you then need to download to your own client machine. Instead of manually checking, Auto FTP will look in a given remote directory and then search for any new files based on a select list of wildcarded entries.
How to get it working
Firstly, you'll need to grab a blank version of the configuration, which you can get here.
Once filled out, you can put it wherever you want (but I'd recommend
AutoFTP has a concept of both a 'download' (
doing) folder and a 'move-to' (
done) folder. If this option is enabled in config, it tells AutoFTP to move completed files into a separate folder. This is useful if you want to separate files that are completed from the ones that are still downloading.
AutoFTP runs as its own user with a UID of 1000 and a GID of 1000. This means that any interactions with the host volumes are mapped to the 1000 UID user of the host (usually this is the first created user of the system). You'll need to ensure that the
/etc/autoftp/autoftp.conf file and the download directories have
rw permissions set for this user.
sudo chown :1000 /etc/autoftp/autoftp.conf sudo chmod 664 /etc/autoftp/autoftp.conf
Running the container
The application will look in the
/etc/autoftp folder for the
autoftp.conf file, so you you'll need to map that volume to wherever you put the configuration on the host. You'll also need to map the destination folder (and move-to folder if you've defined it in config) so the container can write the downloaded files to your host machine.
download-dir config entry is defaulted to '/download/doing' within the container, as well as the
move.directory option, which is '/download/done'. You'll also need to map these folders to your chosen host volume directories in order to get access to the files the application downloads.
With a bit of artistic licence, the following command should get you up and running (please make sure your
autoftp.conf file is already in place):
docker run --name autoftp -d -v /etc/autoftp/autoftp.conf:/etc/autoftp/autoftp.conf -v ~/downloads/doing:/download/doing -v ~/downloads/done:/download/done s7ark/auto-ftp:1.3