Docker搭建FastDFS

docker pull morunchang/fastdfs
docker run -d --name tracker --net=host morunchang/fastdfs sh tracker.sh
docker run -d --name storage --net=host -e TRACKER_IP=103.240.16.226:22122 -e GROUP_NAME=group1 morunchang/fastdfs sh storage.sh
docker exec -it storage  /bin/bash
#修改配置
vi /data/nginx/conf/nginx.conf
location /group1/M00 {
   proxy_next_upstream http_502 http_504 error timeout invalid_header;
     proxy_cache http-cache;
     proxy_cache_valid  200 304 12h;
     proxy_cache_key $uri$is_args$args;
     proxy_pass http://fdfs_group1;
     expires 30d;
}
docker restart storage

你可能感兴趣的:(Docker搭建FastDFS)