qbanxiaoli / fastdfs

FastDFS+FastDHT(单机+集群版)
https://hub.docker.com/r/qbanxiaoli/fastdfs
Apache License 2.0
90 stars 48 forks source link

macos 安装 #2

Closed mengyan183 closed 4 years ago

mengyan183 commented 5 years ago

docker镜像启动成功后, docker exec -it fastdfs /bin/bash

echo "Hello FastDFS!">index.html

fdfs_test /etc/fdfs/client.conf upload index.html 执行这一行时报错 ERROR - file: connection_pool.c, line: 130, connect to 192.168.50.179(这是我当前机器的ip地址 ):22122 fail, errno: 111, error info: Connection refused ;如果我镜像启动时不指定ip 也会报相同的错误
这个怎么解决?

qbanxiaoli commented 4 years ago

mac和windows识别不了host网络,目前的解决方式是新建一个跟宿主机一样的网段,指定容器的ip与宿主机的ip一致,可以用项目中的docker-compose.yml文件,README.md中描述的只适用于linux