DAOS-18826 build: Add HTTP/HTTPS proxy support to Dockerfiles#18018
Open
DAOS-18826 build: Add HTTP/HTTPS proxy support to Dockerfiles#18018
Conversation
Some build environments route outbound traffic through a forward proxy, making the previously supported DAOS_NO_PROXY build argument alone insufficient. This was identified while building on HPE Fort Collins lab nodes. Add DAOS_HTTP_PROXY and DAOS_HTTPS_PROXY build arguments to all four Dockerfiles (el.8, el.9, leap.15, ubuntu), propagating them via ENV instructions (both lowercase and uppercase variants) and persisting them into /etc/environment. Builds without a proxy are unaffected. Signed-off-by: Cedric Koch-Hofer <[email protected]>
|
Ticket title is 'Add HTTP/HTTPS proxy support to DAOS Dockerfiles' |
johannlombardi
previously approved these changes
Apr 16, 2026
grom72
requested changes
Apr 17, 2026
Comment on lines
+31
to
+34
| ENV http_proxy=${DAOS_HTTP_PROXY} | ||
| ENV HTTP_PROXY=${DAOS_HTTP_PROXY} | ||
| ENV https_proxy=${DAOS_HTTPS_PROXY} | ||
| ENV HTTPS_PROXY=${DAOS_HTTPS_PROXY} |
Contributor
There was a problem hiding this comment.
Let's make the file simpler and put all https_proxy related ENVs in one line.
(NO_PROXY can be also combined into the same line)
The same for other files.
Suggested change
| ENV http_proxy=${DAOS_HTTP_PROXY} | |
| ENV HTTP_PROXY=${DAOS_HTTP_PROXY} | |
| ENV https_proxy=${DAOS_HTTPS_PROXY} | |
| ENV HTTPS_PROXY=${DAOS_HTTPS_PROXY} | |
| ENV http_proxy=${DAOS_HTTP_PROXY} HTTP_PROXY=${DAOS_HTTP_PROXY} https_proxy=${DAOS_HTTPS_PROXY} HTTPS_PROXY=${DAOS_HTTPS_PROXY} |
Comment on lines
+38
to
+42
| RUN echo "http_proxy=${DAOS_HTTP_PROXY}" >> /etc/environment && \ | ||
| echo "HTTP_PROXY=${DAOS_HTTP_PROXY}" >> /etc/environment && \ | ||
| echo "https_proxy=${DAOS_HTTPS_PROXY}" >> /etc/environment && \ | ||
| echo "HTTPS_PROXY=${DAOS_HTTPS_PROXY}" >> /etc/environment && \ | ||
| echo "no_proxy=${DAOS_NO_PROXY}" >> /etc/environment && \ |
Contributor
There was a problem hiding this comment.
I think it is worth to use cat << EOF instead of several echo.
The same goes for the other files.
Suggested change
| RUN echo "http_proxy=${DAOS_HTTP_PROXY}" >> /etc/environment && \ | |
| echo "HTTP_PROXY=${DAOS_HTTP_PROXY}" >> /etc/environment && \ | |
| echo "https_proxy=${DAOS_HTTPS_PROXY}" >> /etc/environment && \ | |
| echo "HTTPS_PROXY=${DAOS_HTTPS_PROXY}" >> /etc/environment && \ | |
| echo "no_proxy=${DAOS_NO_PROXY}" >> /etc/environment && \ | |
| RUN cat <<EOF >> /etc/environment | |
| http_proxy=${DAOS_HTTP_PROXY} | |
| HTTP_PROXY=${DAOS_HTTP_PROXY} | |
| https_proxy=${DAOS_HTTPS_PROXY} | |
| HTTPS_PROXY=${DAOS_HTTPS_PROXY} | |
| no_proxy=${DAOS_NO_PROXY} | |
| NO_PROXY=${DAOS_NO_PROXY} | |
| EOF |
Contributor
Author
There was a problem hiding this comment.
I kept the echo in order to be able to not add useless line when the proxy related variable are not defined.
More details in ec63892.
| echo "https_proxy=${DAOS_HTTPS_PROXY}" >> /etc/environment && \ | ||
| echo "HTTPS_PROXY=${DAOS_HTTPS_PROXY}" >> /etc/environment && \ | ||
| echo "no_proxy=${DAOS_NO_PROXY}" >> /etc/environment && \ | ||
| echo "NO_PROXY=${DAOS_NO_PROXY}" >> /etc/environment |
Contributor
There was a problem hiding this comment.
Suggested change
| echo "NO_PROXY=${DAOS_NO_PROXY}" >> /etc/environment |
…/daos-18826/patch-001
Fix reviewers comments: - Simplify env - Improvement of the environment file update Signed-off-by: Cedric Koch-Hofer <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Some build environments route outbound traffic through a forward proxy, making the previously supported DAOS_NO_PROXY build argument alone insufficient. This was identified while building on HPE Fort Collins lab nodes.
Add DAOS_HTTP_PROXY and DAOS_HTTPS_PROXY build arguments to all four Dockerfiles (el.8, el.9, leap.15, ubuntu), propagating them via ENV instructions (both lowercase and uppercase variants) and persisting them into /etc/environment. Builds without a proxy are unaffected.
Steps for the author:
After all prior steps are complete: