docker-compose部署filebrowser
1. 创建一个空目录
# mkdir filebrowser
2. 创建docker-compose.yml文件
# vi docker-compose.yml
version: '3'
services:
filebrowser:
image: filebrowser/filebrowser:latest
container_name: filebrowser
restart: always
ports:
- "8089:80/tcp"
networks:
- net
volumes:
- ./srv:/srv
- ./filebrowser.db:/database.db
- ./.filebrowser.json:/.filebrowser.json
- /etc/localtime:/etc/localtime:ro
networks:
net:
driver: bridge
3. 配置
创建配置文件
# touch filebrowser.db
# mkdir srv
# cat .filebrowser.json
{
"port": 80,
"baseURL": "",
"address": "",
"log": "stdout",
"database": "/database.db",
"root": "/srv"
}
4. 启动服务
docker-compose up -d