Couchdb墨盒在泊坞窗图像中没有响应

我成功地将一个couchdb盒式磁带部署到wso2stratos,并成功激活成员。 为了执行dockerfile,我使用了这个 git代码。 其中包括下面的行,我不知道为什么它在那里! 有人可以解释下面的代码?

RUN printf "[httpd]\nport = 8101\nbind_address = 0.0.0.0" > /usr/local/etc/couchdb/local.d/docker.ini EXPOSE 8101 CMD ["/usr/local/bin/couchdb"] 

我试图指向http://127.0.0.1:5984/_utils/spec/run.htmlurl,并完美的工作。

我只是SSH到docker集装箱,并启动couchdb,

  root@instance-00000001:/usr/local/etc/couchdb/local.d# couchdb couchdb Apache CouchDB 1.6.1 (LogLevel=info) is starting. Apache CouchDB has started. Time to relax. [info] [<0.32.0>] Apache CouchDB has started on http://0.0.0.0:8101/ 

然后我试着将浏览器指向http://0.0.0.0:8101/http://127.0.0.1:5984/_utils/index.html两者都不起作用。

有人可以告诉我为什么我不能查看我的数据库和创build数据库窗口?

对于你的第一个问题,这些行是做什么的:

 # Set port and address for couchdb to bind too. # Remember these are addresses inside the container # and not necessarily publicly available. # See http://docs.couchdb.org/en/latest/config/http.html RUN printf "[httpd]\nport = 8101\nbind_address = 0.0.0.0" > /usr/local/etc/couchdb/local.d/docker.ini # Tell docker that this port needs to be exposed. # You still need to run -P when running container EXPOSE 8101 # This is the command which is run automatically when container is run CMD ["/usr/local/bin/couchdb"] 

至于为什么你不能访问它,你的docker运行命令是什么样子,你公开端口? 即

 docker run -p 8101:8101 .... 

你有没有在OSX上进行testing? 如果是这样,请尝试http://192.168.59.103:8101/在OSX泊坞窗将在一个虚拟箱虚拟机内,因为docker不能在OSX上本地运行。 可以使用boot2docker ip查找虚拟机的IP,通常为192.168.59.103