Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add example on how to use proxy with GHA #17483

Closed
wants to merge 1 commit into from

Conversation

dvdksn
Copy link
Contributor

@dvdksn dvdksn commented Jun 5, 2023

Signed-off-by: David Karlsson david.karlsson@docker.com

Proposed changes

Adds an example on how to set up a proxy with Docker GitHub Actions

Related issues (optional)

docker/build-push-action#822

@dvdksn dvdksn requested review from crazy-max and jedevc as code owners June 5, 2023 18:31
@netlify
Copy link

netlify bot commented Jun 5, 2023

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit d2c7655
🔍 Latest deploy log https://app.netlify.com/sites/docsdocker/deploys/6483239beb8779000872f5e0
😎 Deploy Preview https://deploy-preview-17483--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

Copy link
Member

@crazy-max crazy-max left a comment

Choose a reason for hiding this comment

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

Thanks!

I wonder if we also need a page in "Building images" with a proxy page because we also need to explain that the proxy configuration from the Docker config is used if detected (see https://github.com/crazy-max/docker-build-push-action/blob/6509d7e99a330cd52fb169549758512aa83ca878/.github/workflows/ci.yml#L1021-L1040).

We also need to explain how to set proxy build args when doing a build instead of global daemon set: https://docs.docker.com/engine/reference/builder/#predefined-args. This will only work for RUN instructions and not for pulling imaging or fetching git repos. For this case it needs to be set in buildkit as env driver opt.

Let me know what sounds best

build/ci/github-actions/proxy.md Outdated Show resolved Hide resolved
@crazy-max crazy-max requested a review from tonistiigi June 8, 2023 12:28
@dvdksn
Copy link
Contributor Author

dvdksn commented Jun 8, 2023

@crazy-max proxy configurations are described on this page, it includes information about config.json. It also describes how these settings are used for building, and using build-arg

Signed-off-by: David Karlsson <david.karlsson@docker.com>
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
@dvdksn dvdksn force-pushed the build/gha-proxy-example branch from 3c75d39 to d2c7655 Compare June 9, 2023 13:05

The Docker GitHub Actions use the
[`docker-container` driver](../../drivers/docker-container.md) by default,
which supports setting environment variables through driver options.
Copy link
Member

Choose a reason for hiding this comment

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

Not blocking this but it might be somewhat confusing to new readers why anyone would like to do this.

If we talk about just setting environment variables to buildkit containers then this could be in configure-builder where it is showing some other driver-opts like setting image.

For configuring a proxy for builds we usually mean either passing proxy env as with --build-arg or configuring the proxy setting in Docker CLI conf where buildx reads them.

@docker-robot
Copy link

docker-robot bot commented Sep 13, 2023

Thanks for the pull request. We'd like to make our product docs better, but haven’t been able to review all the suggestions.
As our docs have also diverged, we do not have the bandwidth to review and rebase old pull requests.

If the updates are still relevant, review our contribution guidelines and rebase your pull request against the latest version of the docs, then mark it as fresh with a /remove-lifecycle stale comment.
If not, this pull request will be closed in 30 days. This helps our maintainers focus on the active pull requests.

Prevent pull requests from auto-closing with a /lifecycle frozen comment.

/lifecycle stale

@crazy-max crazy-max added the area/build Relates to Dockerfiles or docker build command label Sep 13, 2023
@docker-robot docker-robot bot closed this Oct 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build Relates to Dockerfiles or docker build command lifecycle/stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants