docker搭建文件服务器


1. nginx搭建文件服务器

镜像

docker pull nginx:latest

nginx配置

server {
    listen 80;   
    server_name localhost; 
    charset utf-8; 
    root /home/nginx;
    
    location / {
        autoindex on; 
        autoindex_exact_size off; 
        autoindex_localtime on;  
    }
} 

docker-compose.yml

version: '2'
services:
  nginx:
    image: nginx:latest
    restart: always
    container_name: nginx-fs
    ports:
      - "8080:80"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./file-store:/home/nginx
      - ./default.conf:/etc/nginx/conf.d/default.conf

2. h5ai网盘

dockerhub-h5ai
h5ai-base
docker-h5ai

3. filebrowser

github-filebrowser
dockerhub-filebrowser


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM