Docker安装fastdfs

运行一个临时容器:

docker run -d \
--name temp-tracker \
season/fastdfs \
tracker

从容中拷贝一份配置文件:

docker cp temp-tracker:/fdfs_conf /home/docker/fastdfs/

编辑/home/docker/fastdfs/storage.conf,修改tracker_server为实际的地址:

tracker_server=192.168.56.100:22122

启动tracker容器:

docker run -it -d --name fdfs-tracker \
-v /home/docker/fastdfs/fdfs_conf:/fdfs_conf \
-v /home/docker/fastdfs/tracker:/fastdfs/tracker/data \
-p 22122:22122 \
season/fastdfs \
tracker

启动storage容器:

docker run -it -d \
--name fdfs-storage \
-p 23000:23000 \
-v /home/docker/fastdfs/fdfs_conf:/fdfs_conf \
-v /home/docker/fastdfs/storage:/fastdfs/storage/data \
-v /home/docker/fastdfs/data:/fastdfs/store_path \
-e TRACKER_SERVER:192.168.56.100:22122 \
-e GROUP_NAME=group1 \
season/fastdfs \
storage

参考:

最后编辑于:2020/11/16作者: 编程小战

我不入地狱,谁入地狱?

评论已关闭