Skip to content

Commit 8c227f3

Browse files
committed
fix: added APT proxy conf
1 parent fa5abcb commit 8c227f3

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

Dockerfile.lite

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@ ENV PYTHON_VERSION=3.11 \
1818
HTTPS_PROXY=${https_proxy} \
1919
NO_PROXY=${no_proxy}
2020

21-
# Optional: help APT when /etc/apt/apt.conf.d is respected (env is usually enough)
22-
# RUN printf 'Acquire::http::Proxy "%s";\nAcquire::https::Proxy "%s";\n' "$http_proxy" "$https_proxy" \
23-
# > /etc/apt/apt.conf.d/80proxy
21+
# Configure APT to use proxy for package installation
22+
RUN if [ -n "$http_proxy" ]; then \
23+
printf 'Acquire::http::Proxy "%s";\nAcquire::https::Proxy "%s";\n' "$http_proxy" "$https_proxy" \
24+
> /etc/apt/apt.conf.d/80proxy; \
25+
fi
2426

2527
# Install runtime dependencies
2628
RUN apt-get update && \

0 commit comments

Comments
 (0)