拉取镜像
docker pull sileeliu/fastdfs
启动命令
docker run -d --restart=always --privileged=true --net=host --name=fastdfs -e IP=YOUR_IP -e WEB_PORT=YOUR_PORT -v /YOUR_DIR/fastdfs:/var/local/fdfs sileeliu/fastdfs
参数说明
YOUR_IP:互联网IP地址
YOUR_PORT:映射端口
YOUR_DIR:容器挂载目录
测试
1. docker exec -it fastdfs /bin/bash
2. echo "Hello FastDFS!">index.html
3. fdfs_test /etc/fdfs/client.conf upload index.html
4. 获取到地址示例:/group1/M00/00/00/rBr5X2BB2YGAfZ69AAAADwL5vO454_big.html
5. 访问地址:http://YOUR_IP:YOUR_PORT/group1/M00/00/00/rBr5X2BB2YGAfZ69AAAADwL5vO454_big.html
客户端上传文件地址
YOUR_IP:22122
注意
1. 服务器需要对外开启的端口:YOUR_PORT、22122、23000
2. 云服务器安全组策略需要放开相应的端口
Content type
Image
Digest
Size
89.5 MB
Last updated
about 5 years ago
docker pull sileeliu/fastdfs