docker使用fastdfs
此容器包括 tracker storage nginx
docker pull zhangxuedong/fdfs_sam
在宿主机创建文件夹
/FILE_SERVER/fastdfs_storage_data
/FILE_SERVER/fastdfs_storage_info
/FILE_SERVER/fastdfs_tracker
sudo docker run -it --name demo -v /FILE_SERVER/fdfs_docker:/mnt centos /bin/bash
把宿主机/FILE_SERVER/fdfs_docker 挂载到 容器 /mnt
进入容器之后
配置文件都在 /etc/fdfs
fdfs_trackerd /etc/fdfs/tracker.conf
fdfs_storaged /etc/fdfs/storage.conf
/usr/local/nginx/sbin/nginx -c /etc/fdfs/nginx.conf
注:出错请查看日志:
cat /mnt/fastdfs_tracker/logs/tracker.log
cat /mnt/fastdfs_storage_info/logs/storage.log