官网文档:https://filebrowser.xyz/installation
准备:
sudo mkdir -p /opt/files sudo chmod -R 755 /opt/files
将 /opt/files/ 文件夹提供给外部访问修改
docker run -itd -v /opt/files/:/srv -v /opt/filebrowser/filebrowserconfig.json:/etc/config.json -v /opt/filebrowser/database.db:/etc/database.db -p 9000:80 filebrowser/filebrowser
打开:http://localhost:9000
-
Username:
admin
-
Password:
admin
DockerFile Browser is also available as a Docker image. You can find it on Docker Hub. The usage is as follows:
/path/to/root ==> 需要挂载的根目录
docker run \ -v /path/to/root:/srv \ -v /path/filebrowser.db:/database.db \ -v /path/.filebrowser.json:/.filebrowser.json \ -p 80:80 \ filebrowser/filebrowser
By default, we already have a configuration file with some defaults so you can just mount the root and the database. Although you can overwrite by mounting a directory to with a new config file. If you don't already have a database file, make sure to create a new empty file under the path you specified. Otherwise, Docker will create an empty folder instead of an empty file, resulting in an error when mounting the database into the container.
File Browser就是一个文件浏览器,因为linux并不方便桌面管理,所以Filebrowser就是帮助我们管理linux服务器上文件的程序,你可以称他为网盘程序,可以管理文件、可以分享文件,另外它还可以在线播放.mp4视频。
下载filebrowser镜像
docker pull filebrowser/filebrowser |
创建filebrowser挂载所需要的目录
mkdir filebrowser |
启动filebrowser
docker run -d -v /root/filebrowser/sites/root:/srv -v /root/filebrowserconfig.json:/etc/config.json -v /root/filebrowser/database.db:/etc/database.db -p 80:80 filebrowser/filebrowser |
通过浏览器访问,默认账号密码:admin