docker映像中的Couchdb盒带没有响应

docker映像中的Couchdb盒带没有响应,couchdb,docker,openstack,paas,wso2stratos,Couchdb,Docker,Openstack,Paas,Wso2stratos,我成功地将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"]

我成功地将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.html
url及其工作原理完美

我只是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/
root@instance-00000001:/usr/local/etc/couchdb/local.d#couchdb couchdb
apachecouchdb1.6.1(LogLevel=info)正在启动。
apachecouchdb已经启动。是时候放松了。
[info][]Apache CouchDB已在上启动http://0.0.0.0:8101/
然后我尝试将浏览器指向
http://0.0.0.0:8101/
http://127.0.0.1:5984/_utils/index.html
它们都不工作


有人能告诉我为什么我不能查看数据库和创建数据库窗口吗?

关于这些行的作用的第一个问题:

# 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 run命令是什么样子的,你是否公开了这个端口?i、 e

docker run -p 8101:8101 ....

你有没有在OSX上测试过?如果是,请尝试
http://192.168.59.103:8101/
在OSX上docker将位于虚拟机中,因为docker无法在OSX上本机运行。可以使用boot2docker IP查找虚拟机的IP,对于您关于这些行的第一个问题,通常是
192.168.59.103

# 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 run命令是什么样子的,你是否公开了这个端口?i、 e

docker run -p 8101:8101 ....

你有没有在OSX上测试过?如果是,请尝试
http://192.168.59.103:8101/
在OSX上docker将位于虚拟机中,因为docker无法在OSX上本机运行。可以使用boot2docker IP查找虚拟机的IP,对于您关于这些行的第一个问题,通常是
192.168.59.103

# 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 run命令是什么样子的,你是否公开了这个端口?i、 e

docker run -p 8101:8101 ....

你有没有在OSX上测试过?如果是,请尝试
http://192.168.59.103:8101/
在OSX上docker将位于虚拟机中,因为docker无法在OSX上本机运行。可以使用boot2docker IP查找虚拟机的IP,对于您关于这些行的第一个问题,通常是
192.168.59.103

# 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 run命令是什么样子的,你是否公开了这个端口?i、 e

docker run -p 8101:8101 ....
你有没有在OSX上测试过?如果是,请尝试
http://192.168.59.103:8101/
在OSX上docker将位于虚拟机中,因为docker无法在OSX上本机运行。可以使用boot2docker IP查找虚拟机的IP,通常为
192.168.59.103