我正在尝试将json上传到docker中的本地bedbase服务器。
为此,我在docker文件中使用了以下内容
From couchbase
ADD lines2.json /
RUN echo "1 - PWD"$pwd
WORKDIR opt/couchbase/bin
RUN echo "2 - PWD "$PWD
CMD ["cbimport", "json", "-u", "Administrator", "-p", "password", "-b", "sample", "-c", "couchbase://localhost", "-f", "lines", "-d", "file:///lines2.json", "-g", "key::%name%", "-t", "4"]
获取错误为:
Json导入失败:其余客户端错误(GET http://localhost:8091/pools):拨打tcp 127.0.0.1:8091:getsockopt: 连接被拒绝
请帮助我解决问题
谢谢
答案 0 :(得分:0)
在下面运行: * docker exec -it db bash *主机名
复制主机名(例如93871f306931),并用该主机名替换“ couchbase:// localhost”