[英]Docker: Artifactory CE-C++ behind a reverse proxy (using traefik)
I'm trying to run Artifactory (Artifactory CE-C++, V7.6.1) behind a reverse proxy (Traefik v2.2, latest).我正在尝试在反向代理(Traefik v2.2,最新)后面运行 Artifactory(Artifactory CE-C++,V7.6.1)。 Both are official unaltered docker-images.
两者都是官方未更改的 docker-images。 For starting them up I'm using docker-compose.
为了启动它们,我使用的是 docker-compose。
My artifactory-yml-file ( docker-compose.yml ) uses the following traefik-configuration:我的 artifactory-yml 文件( docker-compose.yml )使用以下 traefik 配置:
image: docker.bintray.io/jfrog/artifactory-cpp-ce
[...]
lables:
- "traefik.enable=true"
- "traefik.http.routers.artifactory.rule = Host(`localhost`) && PathPrefic(`/artifactory`)"
- "traefik.http.routers.artifactory.middlewares=artifactory-strippprefix"
- "traefik.http.middlewares.artifactory-strippprefix.strippprefix.prefixes=/"
- "traefik.docker.network=docker-network"
Note: My network docker network is just a simple docker network (external).注意:我的网络 docker 网络只是一个简单的 docker 网络(外部)。 I have this still in there because of traefik v1
由于 traefik v1,我仍然在其中
My artifactory is accessible at the beginning over http://localhost/artifactory/
, but only when starting up.我的工件一开始可以通过
http://localhost/artifactory/
访问,但只能在启动时访问。 As soon as artifactory wants me to redirect to its UI, it takes me to http://localhost/ui/
instead of (I guess?) http://localhost/artifactory/ui/
, which is invalid.一旦 artifactory 想让我重定向到它的 UI,它就会把我带到
http://localhost/ui/
而不是(我猜?) http://localhost/artifactory/ui/
,这是无效的。
I'm seeking either for a feature to tell artifactory it should account the prefix /artifactory
when forwarding or a possibility in traefik to alter artifactory's forward -response in a way that the forward-url matches the path.我正在寻找一个功能来告诉 artifactory 它应该在转发时考虑前缀
/artifactory
或者在 traefik 中以转发 URL 匹配路径的方式改变 artifactory 的转发响应的可能性。
I'm also using Jenkins with traefik, there it was as simple as adding我也在使用带有 traefik 的 Jenkins,就像添加一样简单
JENKINS_OPTS: "--prefix=/jenkins"
The Artifactory CE-C++ opens up two ports: 8081 and 8082. I suggest your reverse proxy points to the format port 8081, does it? Artifactory CE-C++ 开放了两个端口:8081 和 8082。我建议您的反向代理指向格式端口 8081,是吗? Whereas the UI endpoint is AFAIK served on 8082. Did you try this port?
而 UI 端点是在 8082 上提供的 AFAIK。你尝试过这个端口吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.