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

猜你喜欢

转载自www.cnblogs.com/418836844qqcom/p/12202545.html