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

Aperta
#4,458 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
docker, docker-compose, shell

Direzione di ricerca

Inizia da install/dc-detect-version.sh per tracciare come vengono calcolati gli argomenti di build del proxy, quindi esamina jq/Dockerfile, sentry/Dockerfile e cron/Dockerfile. Esegui il processo di installazione/build con le variabili del proxy configurate in .env.custom; l'attività è completata quando tutte e tre le immagini vengono create correttamente tramite il proxy senza patch manuali ai Dockerfile.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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

Lingua principale
Shell
Stelle
9.7k
Fork
2k
Merge medio
3g 2h
PR unite (30g)
16

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/self-hosted

Tutte le issue di getsentry/self-hosted

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.