docker+fastdfs+springboot一键式搭建分布式文件服务器

1.拉去镜像

docker pull qbanxiaoli/fastdfs

2.启动fastdfs

docker run -d --restart=always --privileged=true --net=host --name=fastdfs -e IP={IP} -e WEB_PORT=80 -v ${HOME}/fastdfs:/var/local/fdfs qbanxiaoli/fastdfs

IP 后面是你的服务器公网ip或者虚拟机的IP,-e WEB_PORT=80 指定nginx端口

3.测试fastdfs是否搭建成功

docker exec -it fastdfs /bin/bash

echo "Hello FastDFS!">index.html

fdfs_test /etc/fdfs/client.conf upload index.html

 

 能返回url就意见搭建成功

 

 4.搭建springboot

代码地址:https://gitee.com/WuLiang19900120/fastdfs.git

posted @ 2020-01-16 17:53  紫枫夜羽  阅读(447)  评论(0)    收藏  举报