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