docker安装FastDFS
(开机即启动)
docker run -d --restart=always --privileged=true --net=host
–name=fastdfs -e IP=192.168.202.128 -e WEB_PORT=80 -v ${HOME}/fastdfs:/var/local/fdfs
registry.cn-beijing.aliyuncs.com/tianzuo/fastdfs
具体:
docker run -d --restart=always --privileged=true --net=host --name=fastdfs -e IP=192.168.202.128 -e WEB_PORT=80 -v ${HOME}/fastdfs:/var/local/fdfs registry.cn-beijing.aliyuncs.com/tianzuo/fastdfs
测试上传
# 进入容器
docker exec -it fastdfs /bin/bash
# 创建文件
echo "Hello FastDFS!">index.html
# 测试文件上传
fdfs_test /etc/fdfs/client.conf upload index.html
访问 http://192.168.202.128/group1/M00/00/00/wKjKgF48OGaATH7nAAAADwL5vO468_big.html
显示:Hello FastDFS!