Skip to content

Instantly share code, notes, and snippets.

@praul
Created May 27, 2021 05:29
Show Gist options
  • Save praul/21d0b11aec5a0b71be8e406e9d7858f7 to your computer and use it in GitHub Desktop.
Save praul/21d0b11aec5a0b71be8e406e9d7858f7 to your computer and use it in GitHub Desktop.
Share files from filebrowser docker
#!/bin/bash
#These are two scripts to share and unshare files and folders to filebrowser, that runs in a docker container via docker-compose.
#It works across filesystems and users dockers own mount-binds.
#This image and the corresponding docker-compose.yml has been used: https://github.com/filebrowser/filebrowser
#See https://gist.github.com/praul/5234338823d61ac794e2fd95befc0b3d for share script
# Adjust path to docker-compose folder accordingly
# Usage: fbunshare.sh <FILE,FOLDER,OR PARTS OF IT>
cd /docker/user/compose/filebrowser
grep -v "$1" docker-compose.yml > tmpfile && mv tmpfile docker-compose.yml
docker-compose up -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment