Skip to content

SRE-4027 build: provide ZSCALER_CA_FILE arg for local docker builds - #19045

Open
soumagne wants to merge 1 commit into
masterfrom
soumagne/zscaler_cont
Open

SRE-4027 build: provide ZSCALER_CA_FILE arg for local docker builds#19045
soumagne wants to merge 1 commit into
masterfrom
soumagne/zscaler_cont

Conversation

@soumagne

Copy link
Copy Markdown
Collaborator

Fix leap 15 docker build

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).

Fix leap 15 docker build

Signed-off-by: Jerome Soumagne <jerome.soumagne@hpe.com>
@soumagne

Copy link
Copy Markdown
Collaborator Author

As mentioned in the ticket, the way I would have to currently build images locally is by doing:

docker build --platform linux/amd64 . --file utils/docker/Dockerfile.leap.15 --build-arg DEPS_JOBS=6 --tag daos.leap.15 --build-arg ZSCALER_CA_FILE="$(cat ~/Downloads/ZscalerRootCerts/ZscalerRootCertificate-2048-SHA256.crt)" --build-arg DAOS_JAVA_BUILD=no --build-arg DAOS_DEPS_BUILD=yes

which means passing the zscaler root certificate directly. If instead someone tells me that this certificate can be hosted somewhere and we can instead use some URL directly, this might work too for me.

@github-actions

Copy link
Copy Markdown

Errors are Unable to load ticket data
https://daosio.atlassian.net/browse/SRE-4027

@JohnMalmberg JohnMalmberg left a comment

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.

Wrong approach.

ARG JENKINS_URL
ARG REPOS
ARG DAOS_LAB_CA_FILE_URL
ARG ZSCALER_CA_FILE

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.

Do not make this type of change, it is not going to help you at all long term.

All access to the dockerfiles has to come from Artifactory.
If you are running your own docker host, in the lab you need to have it setup to use:
hub.daos.hpc.amslabs.hpecorp.net or it will not work reliably.

Docker is blocking most access from the corporate proxy from anonymous users. We have setup the CI docker builders to pull from alternative sources because of this and we use a trick to make it look like it is using images from the dockerhub.

Any use of HTTPS_PROXY to avoid using the internal Artifact Servers is a bug, that needs to be removed.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Just to be clear, this is not something I want to use in CI builds. I only want to use that option for my local docker builds on my laptop.

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.

Then install the ZSCALER CA on laptop on what ever is running docker. It does not need to be in the dockerfile.

I have updated the ticket for this with how to access the internal docker hub.

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 understand more of what you are trying to do now, I think.

Now when you are doing this build on your laptop, are you using any lab resources at all?

If you are not using lab resources than you use:

DAOS_LAB_CA_FILE_URl to pass your zscaler cert contents.

And then the repo-helper scripts can see of DAOS_LAB_CA_FILE_URI starts with HTTP:// or HTTPS:// and then install the CA accordingly.

If you are using LAB resources like Artifactory, then you should be able to get what you need without the Zscaler CA.

@soumagne soumagne Sep 10, 2026

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

That's right, I'm not using any of the lab resources in this case. I think I can try doing what you just proposed with DAOS_LAB_CA_FILE_URI.
Zscaler intercepts all HTTP traffic on HPE laptops so afaik there is no other solution than installing the Zscaler certificate, this is further described in https://docs.docker.com/guides/zscaler/

@daosbuild3

Copy link
Copy Markdown
Collaborator

@soumagne

Copy link
Copy Markdown
Collaborator Author

Wrong approach.

I'm trying to build docker images locally on my laptop, in this particular case a Mac, what is your solution then ? To me this is a quick solution for testing things without having to go through CI.

@JohnMalmberg JohnMalmberg left a comment

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.

Can you just reuse the DAOS_LAB_CA_FILE_URI parameter instead of adding a new one?

ARG JENKINS_URL
ARG REPOS
ARG DAOS_LAB_CA_FILE_URL
ARG ZSCALER_CA_FILE

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 understand more of what you are trying to do now, I think.

Now when you are doing this build on your laptop, are you using any lab resources at all?

If you are not using lab resources than you use:

DAOS_LAB_CA_FILE_URl to pass your zscaler cert contents.

And then the repo-helper scripts can see of DAOS_LAB_CA_FILE_URI starts with HTTP:// or HTTPS:// and then install the CA accordingly.

If you are using LAB resources like Artifactory, then you should be able to get what you need without the Zscaler CA.

@JohnMalmberg

Copy link
Copy Markdown
Contributor

Right now, I have determined that when in the lab environment the HTTP_PROXY/HTTPS_PROXY are not needed for the Dockerfiles.

And so far I have not found any CI tests that need them set either when in the lab.

I will change my PR a bit when I get a chance to remove the use of those experimental repos.

@soumagne

soumagne commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator Author

Right now, I have determined that when in the lab environment the HTTP_PROXY/HTTPS_PROXY are not needed for the Dockerfiles.

And so far I have not found any CI tests that need them set either when in the lab.

I will change my PR a bit when I get a chance to remove the use of those experimental repos.

If I recall @knard38 was the one who added those HTTP_PROXY stuff so you might want to see with him :) (this is outside the scope of this PR)

@JohnMalmberg

Copy link
Copy Markdown
Contributor

If I recall @knard38 was the one who added those HTTP_PROXY stuff so you might want to see with him :) (this is outside the scope of this PR)

Looks like a document is needed to explain how to properly use proxy and artifact servers, and why using proxy environment variables should be avoided when ever possible.

Currently we seem to be using HTTP_PROXY where we should not be, and this is causing some of the instability in our CI.

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.

3 participants