Docker容器,Jelastic中的本地网络 [英] Docker container, local networking in Jelastic

查看:164
本文介绍了Docker容器,Jelastic中的本地网络的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在某些Jelastic环境中,我想与NextCloud一起在线安装collabora.

I want to install collabora Online with NextCloud, in some Jelastic environment.

设置NextCloud真是太不容易了,我只是选择了正确的docker映像,访问了给定的url和voila.

Set up NextCloud was a peace of cake, I just pic the right docker image, access the public given url and voila.

现在我无法使Collabora Online服务器正常工作.

Now I can't make the Collabora Online server to work.

在常规的专用服务器上,运行

In a regular dedicated server, I run

docker run -t -d -p 9980:9980 -e"extra_params =-o:ssl.enable = false"协作/代码

docker run -t -d -p 9980:9980 -e "extra_params=--o:ssl.enable=false" collabora/code

我可以使用 http://ip-add:9980

我向Collabora码头工人镜像的节点添加了一个公共IP.

I added a public IP to the node of the Collabora docker image.

如果我运行:curl -k http://public-ip-add:9980

我得到了curl: (7) couldn't connect to host

http://ip-add:9980

另一种(也是更正确的方法)是运行此docker命令

the other (and more proper way) is to run this docker command

docker run -t -d -p 127.0.0.1:9980:9980 -e 'domain=cloud\\.communecter\\.org\|cloud\\.openappecosystem\\.cc\|cloud\\.cosystem\\.cc' --restart always --cap-add MKNOD collabora/code

并在nginx上配置反向代理,如下所示:

and configure reverse proxy on nginx, like that :

# static files
location ^~ /loleaflet {
    proxy_pass https://localhost:9980;
    proxy_set_header Host $http_host;
}

# WOPI discovery URL
location ^~ /hosting/discovery {
    proxy_pass https://localhost:9980;
    proxy_set_header Host $http_host;
}

# Capabilities
location ^~ /hosting/capabilities {
    proxy_pass https://localhost:9980;
    proxy_set_header Host $http_host;
}

# main websocket
location ~ ^/lool/(.*)/ws$ {
    proxy_pass https://localhost:9980;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $http_host;
    proxy_read_timeout 36000s;
}

# download, presentation and image upload
location ~ ^/lool {
    proxy_pass https://localhost:9980;
    proxy_set_header Host $http_host;
}

# Admin Console websocket
location ^~ /lool/adminws {
    proxy_pass https://localhost:9980;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "Upgrade";
    proxy_set_header Host $http_host;
    proxy_read_timeout 36000s;
}

但是这里nginx不应该是docker镜像,所以我不知道如何正确地将Collabora节点链接到nginx节点.我尝试使用链接"和端点",但没有成功.

But here nginx not suppose to be a docker image so I don't know how to proper link the Collabora node into the nginx node. I try with "link" and "endpoints", without sucess.

推荐答案

默认情况下,仅公开端口80和443,但是看起来您可以添加

By default only port 80 and 443 are exposed, however, it looks like you can add an endpoint manually for private port 9980 which is the port your app is bound to. Hope if helps.

这篇关于Docker容器,Jelastic中的本地网络的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆