FastDFS(二)docker安裝FastDFS

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!

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章