-
Notifications
You must be signed in to change notification settings - Fork 580
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
Action not fetching images when behind HTTP proxy on self-hosted runner #822
Comments
I have the exact same issue on my side 😞 Using ERROR: failed to solve: DeadlineExceeded: DeadlineExceeded: DeadlineExceeded: summerwind/actions-runner:ubuntu-22.04: failed to do request: Head "https://registry-1.docker.io/v2/summerwind/actions-runner/manifests/ubuntu-22.04": dial tcp 44.205.64.79:443: i/o timeout
Error: buildx failed with: ERROR: failed to solve: DeadlineExceeded: DeadlineExceeded: DeadlineExceeded: summerwind/actions-runner:ubuntu-22.04: failed to do request: Head "https://registry-1.docker.io/v2/summerwind/actions-runner/manifests/ubuntu-22.04": dial tcp 44.205.64.79:443: i/o timeout But, it works fine if I use |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Where is the GitHub Runner |
@grahamb If you want to propagate an -
name: Propagate .env
run: |
for l in "$(cat .env)"; do
echo "${l?}" >> $GITHUB_ENV
done @subigre Can you post a repro with env vars being used and your workflow please and also enable BuildKit debug logs. If you can also add this step inside your workflow to check the context: -
name: Dump context
uses: crazy-max/ghaction-dump-context@v2 |
@crazy-max, here is the workflow I used: name: Docker
on:
workflow_dispatch:
env:
IMAGE_NAME: ${{ github.repository }}
jobs:
build-and-push:
runs-on: [ self-hosted ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker context
run: docker context create builders
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
endpoint: builders
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
push: false
tags: ${{ env.IMAGE_NAME }} And the output logs: In addition, here are the logs from
Finally, here are the info display in the Docker info by
|
@subigre How have you setup your cluster?
What is this endpoint? I don't see any logs about it in output-logs.txt. |
Hi, I can confirm this issue on my end as well. |
I just made a test in this repo to check if proxy envs are propagated to
@grahamb Proxy config support for registry pull or git clones should work when setting up BuildKit using the -
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
driver-opts: |
env.http_proxy=http://1.2.3.4:3128
env.https_proxy=http://1.2.3.4:3128
buildkitd-flags: --debug You might also be interested in moby/buildkit#3750. @dvdksn Maybe some docs on setting up proxy config in GHA would be useful. Closing this issue since that should answer this question, but feel free to left a comment with good repro (workflow, BuildKit logs) if you still encounter an issue. Thanks. |
Troubleshooting
Before submitting a bug report please read the Troubleshooting doc.
Behaviour
When running on a self-hosted runner (RHEL8) behind a HTTP proxy, build jobs fail when attempting to fetch the Docker image referenced in the
FROM
line in the Dockerfile:When running the same
docker buildx build
command on the runner manually with a checkout of the repo, the build succeeds.Configuration
Dockerfile:
Build YAML file
GitHub Runner .env file:
Runner user's ~/.docker/config.json
Logs
logfile.txt
The text was updated successfully, but these errors were encountered: