Fix Docker build without VPN proxy dependency

Make build proxy optional and use Arvan mirrors for apt/pip by default. Fixes 503 errors when xray proxy on 172.17.0.1:1081 is unavailable during Dokploy deploy.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-06-10 20:26:09 +03:30
parent 63d0699cdd
commit 384680cd82
3 changed files with 35 additions and 20 deletions
+4 -3
View File
@@ -3,11 +3,12 @@ services:
build:
context: .
dockerfile: Dockerfile
network: host
args:
BASE_IMAGE: docker.arvancloud.ir/library/python:3.12-slim-bookworm
HTTP_PROXY: http://172.17.0.1:1081
HTTPS_PROXY: http://172.17.0.1:1081
PYPI_INDEX: https://mirror.arvancloud.ir/pypi/simple
# اختیاری — فقط اگر xray روی host فعال است:
BUILD_HTTP_PROXY: ${BUILD_HTTP_PROXY:-}
BUILD_HTTPS_PROXY: ${BUILD_HTTPS_PROXY:-}
container_name: mirror-manager
restart: unless-stopped
privileged: true