A lightweight and streamlined Docker image for FileBrowser, designed for minimal footprint and simplified deployment. This project builds the FileBrowser binary from source and packages it into a tiny busybox-based image.
-
Minimal Image Size
-
Simplified Configuration:
No pre-defined user and healthcheck,support passing --config arg for custom config file location.
This image doesn't have ca-certificates, so you need to a reverse proxy like nginx/caddy for tls support.
Deployment is similar to filebrowser v2.33.0+. There is two differences:
- You don't have to change the permission of two mounted dirs. No more uid/gid mapping issues in rootless environment.
- You can directly pass --config arg to container without overiding the whole entrypoint.
docker run -d \
-p 8080:80 \
-v /path/to/your/files:/srv \
-v /path/to/your/config_and_db_dir:/config \
--name filebrowser-lean \
ghcr.io/outlook84/filebrowser-lean:latest- Replace
/path/to/your/fileswith the absolute path to the directory you want FileBrowser to serve. - Replace
/path/to/your/config_and_db_dirwith an absolute path where you want thesettings.jsonandfilebrowser.db(new name for database) to persist. Ifsettings.jsonis not present in this volume, a default one will be created.
If you are migrating from an official filebrowser/filebrowser image older than v2.33.0, you will need to follow these steps due to breaking changes in how configuration and database files are handled.
Assume your original configuration file is .filebrowser.json and your database is database.db.
-
Prepare a New Configuration Directory: Create a directory on your host machine to store the new configuration file and database. For example:
mkdir -p /path/to/your/config_and_db_dir -
Rename and Move Files:
- Rename
.filebrowser.jsontosettings.json. - Rename
database.dbtofilebrowser.db. - Move both of these newly named files into the directory you just created (
/path/to/your/config_and_db_dir).
- Rename
-
Start with the New
docker runCommand above