我成功地将一个couchdb墨盒部署到wso2stratos并成功地激活了成员get。对于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和它完美地工作在一起。
我刚到码头集装箱上启动了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,它们都不能工作。
有人能告诉我为什么我不能查看我的数据库并创建数据库窗口吗?
发布于 2014-09-29 19:13:20
关于这些行是做什么的第一个问题:
# 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 -p 8101:8101 ....你有没有机会在OSX上进行测试?如果是这样的话,请尝试将OSX上的http://192.168.59.103:8101/停靠在虚拟盒VM中,因为对接器不能在OSX上本地运行。虚拟机的IP可以使用boot2docker ip查找,通常是192.168.59.103。
https://stackoverflow.com/questions/26101114
复制相似问题