This sample demonstrates how to run JFileServer-Enterprise using Docker.
The sample setup includes two shared filesystems :-
-
Using a local folder
Uses the org.filesys.smb.server.disk.JavaNIODiskDriver filesystem driver
-
Using the database filesystem
Uses the org.filesys.server.filesys.db.DBDiskDriver filesystem driver with a PostGres database. The file data is stored in a local folder with the file/folder metadata stored in a database.
To run the JFileServer-Enterprise Docker sample with SMB2 and/or SMB3 enabled requires a licence key. You can request a trial licence key by emailing info@filesys.org.
Firstly, download the sample docker-compose.yml file.
Edit the docker-compose.yml file and set the volume mappings for the local host folder to be shared by the file server, and set the mapping for the host folder that contains the jfileserver.lic licence key.
volumes:
- <MAP-TO-A-LOCAL-FOLDER>:/jfileserver/fileShare
- <MAP-TO-A-LOCAL-FOLDER>:/jfileserver/licence
The file server can be configured using environment variables. The following table shows the environment variables that can be overridden, and their default values :-
| Variable Name | Description | Default Value |
|---|---|---|
| JFSRV_SMB_ENABLE | Enable the SMB server | true |
| JFSRV_FTP_ENABLE | Enable the FTP server | false |
| JFSRV_NFS_ENABLE | Enable the NFS server | false |
| JFSRV_SMB_SERVERNAME | Name of the SMB server, for NetBIOS connections | jfilesrv |
| JFSRV_SMB_DOMAIN | Domain or workgroup that the SMB server belongs to | domain |
| JFSRV_SMB_DIALECTS | SMB dialects that the SMB server will negotiate | SMB2,SMB3 |
| JFSRV_SMB_DEBUGFLAGS | SMB debug flags | Negotiate,Socket,State,Error,File,Info |
| JFSRV_FTP_PORT | Port that the FTP server listens on | 21 |
| JFSRV_FTP_DEBUGFLAGS | FTP debug flags | File,Search,Error,DataPort,Directory |
| JFSRV_NFS_DEBUGFLAGS | NFS debug flags | File,FileIO |
| JFSRV_SHARE_NAME | Shared filesystem name | jfileshare |
| JFSRV_SHARE_PATH | Path to the shared filesystem data | /jfileserver/fileShare |
| JFSRV_SHARE_COMMENT | Comment for the shared filesystem | Test shared filesystem |
| JFSRV_DBSHARE_NAME | Name of the database share | dbshare |
| JFSRV_DBSHARE_PATH | Path to the database share data | /jfileserver/dbshare |
| JFSRV_ADMIN_USER | Administrator user name | admin |
| JFSRV_ADMIN_PASSWORD | Administrator user password | jfilesrv |
| JFSRV_NORMAL_USER | Normal user name | user |
| JFSRV_NORMAL_PASSWORD | Normal user password | java |
| JFSRV_DEBUG_OUTPUT | Debug output destination, 'File' or 'Console' | Console |
| JFSRV_DEBUG_LOGPATH | Log file path when using 'File' debug output | /jfileserver/logs/jfileserver.log |
| JFSRV_LICENCE_PATH | Path to the licence file | /jfileserver/licence/jfileserver.lic |
To start the file server, run the following command:
docker-compose up