Docker builds for jq, sentry and cron break for me because of the proxy, and it's not an isolated case

未关闭
#4,458 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 2 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
72/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
冷清
技术栈
docker, docker-compose, shell

调研方向

从 install/dc-detect-version.sh 开始,跟踪代理构建参数的计算方式,然后检查 jq/Dockerfile、sentry/Dockerfile 和 cron/Dockerfile。使用在 .env.custom 中配置的代理变量运行安装/构建流程;当三个镜像都能通过代理成功构建,且无需手动修改 Dockerfile 时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

Waiting for: Community
Self-Hosted Version

26.5.2

CPU Architecture

x86_64

Docker Version

29.7.1

Docker Compose Version

5.3.1

Machine Specification
  • My system meets the minimum system requirements of Sentry
Installation Type

since the fresh install version 24.X

Steps to Reproduce
  • Deploy self-hosted behind a filtering outbound proxy (in my case a Squid proxy in a DMZ where all outbound traffic is controlled).
  • Configure the proxy variables (HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy) in .env.custom, as documented.
  • Run the install/build process so install/dc-detect-version.sh computes these proxy build-args and Docker builds the jq, sentry and cron images.
Expected Result

The proxy variables computed by install/dc-detect-version.sh should be passed through to the jq, sentry and cron Dockerfiles as build ARGs, the same way the rest of the installation already honors the proxy configured in .env.custom. The builds should succeed without needing any outbound access outside the proxy.

Actual Result

The jq/Dockerfile, sentry/Dockerfile and cron/Dockerfile never declare the proxy variables as ARG, so Docker silently discards them at build time. In practice this causes pip install to time out in sentry/Dockerfile, and apt failures in jq/Dockerfile and cron/Dockerfile.

Since v25, I've had to manually patch these three Dockerfiles on every update with a bash script I maintain myself, otherwise the build breaks in my environment.

This isn't isolated: I ran into a related issue with the snuba-api healthcheck routing local requests through the proxy when it shouldn't (urllib.request doesn't support CIDR notation in NO_PROXY), opened separately as #4441. Both point to the same root cause: self-hosted has likely never been tested end-to-end behind a mandatory proxy, even though that's my everyday setup and probably the case for others deploying in corporate environments with filtered outbound access.

I had submitted a fix for this in #4443, but the PR was closed, more over form than over the substance of the problem. The bug is still there, and I'm still working around it with my script on every version bump. I'm opening this issue to put the underlying need back on the table independently of my previous patch, and I'm happy to rework a PR once we agree on the approach.

Thanks !

Event ID

No response

主要语言
Shell
星标
9.7k
派生
2k
平均合并
3 天 2 小时
30 天内合并 PR
16

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

getsentry/self-hosted 的其他 Issue

查看 getsentry/self-hosted 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。