Skip to content

DAOS-18826 build: Add HTTP/HTTPS proxy support to Dockerfiles#18018

Open
knard38 wants to merge 3 commits intomasterfrom
ckochhof/dev/master/daos-18826/patch-001
Open

DAOS-18826 build: Add HTTP/HTTPS proxy support to Dockerfiles#18018
knard38 wants to merge 3 commits intomasterfrom
ckochhof/dev/master/daos-18826/patch-001

Conversation

@knard38
Copy link
Copy Markdown
Contributor

@knard38 knard38 commented Apr 15, 2026

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:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • Appropriate Functional Test Stages were run.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

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]>
@github-actions
Copy link
Copy Markdown

Ticket title is 'Add HTTP/HTTPS proxy support to DAOS Dockerfiles'
Status is 'In Progress'
https://daosio.atlassian.net/browse/DAOS-18826

johannlombardi
johannlombardi previously approved these changes Apr 16, 2026
@knard38 knard38 self-assigned this Apr 16, 2026
Comment thread utils/docker/Dockerfile.el.9 Outdated
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}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}

Copy link
Copy Markdown
Contributor Author

@knard38 knard38 Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Simplify ENV

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Simplify ENV

Fixed with commit ec63892

Comment thread utils/docker/Dockerfile.el.9 Outdated
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 && \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread utils/docker/Dockerfile.el.9 Outdated
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
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo "NO_PROXY=${DAOS_NO_PROXY}" >> /etc/environment

@knard38 knard38 marked this pull request as ready for review April 17, 2026 13:43
Fix reviewers comments:
- Simplify env
- Improvement of the environment file update

Signed-off-by: Cedric Koch-Hofer <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants