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

error: could not create a builder instance with TLS data loaded from environment #105

Closed
lexfrei opened this issue Aug 25, 2021 · 6 comments · Fixed by Tradeshift/actions-docker#312

Comments

@lexfrei
Copy link

lexfrei commented Aug 25, 2021

Behaviour

Steps to reproduce this issue

  1. Install k3s in your arm64 cluster
  2. Install actions-runner-controller
  3. Run your workflow there

Expected behaviour

No errors

Actual behaviour

error: could not create a builder instance with TLS data loaded from environment. Please use docker context create <context-name> to create a context for current environment and then create a builder instance with docker buildx create <context-name>

Configuration

name: Main Workflow

on:
  push

jobs:
  lint:
    runs-on: self-hosted
    steps:
      - uses: actions/checkout@v2.3.4
      - name: golangci-lint
        uses: golangci/golangci-lint-action@v2.5.2
        with:
          version: v1.42
      # Waiting for https://github.com/hadolint/hadolint-action/issues/38
      # - name: hadolint
      #   uses: hadolint/hadolint-action@v1.5.0
      #   with:
      #     dockerfile: build/vk2tg/Dockerfile

  build:
    needs: lint
    runs-on: self-hosted
    steps:

    - name: Docker meta
      id: docker_meta
      uses: docker/metadata-action@v3.5.0
      with:
        images: ghcr.io/${{ github.repository }}
        flavor: |
          latest=true
        tags: |
            type=ref,event=branch
            type=ref,event=pr
            type=sha
    - name: Set up QEMU
      uses: docker/setup-qemu-action@v1.2.0

    - name: Checkout
      uses: actions/checkout@v2.3.4

    - name: Set up Docker Buildx
      uses: docker/setup-buildx-action@v1.5.1

  <...>

Logs

logs_415.zip

@crazy-max
Copy link
Member

crazy-max commented Sep 1, 2021

@lexfrei Looks like you're using a self-hosted runner and the default context is from a tls environment but you can't create a builder instance from a tls environment (see docker/buildx#30)

You have to create a context for the current environment with docker context create <context-name> like the error message suggest.

@lexfrei
Copy link
Author

lexfrei commented Sep 2, 2021

For history:
Fix

@DmitriyBobrovskiy
Copy link

For history: Fix

For the history if repo will be gone:
image

samip5 added a commit to skyssolutions/lynxchan that referenced this issue Nov 21, 2022
budimanjojo added a commit to budimanjojo/home-cluster that referenced this issue Jan 13, 2023
@joaoluiznaufel
Copy link

but this is coming back to version 1. Someome already know how to do a proper fix using v2?

@joaoluiznaufel
Copy link

ah, found it, you can use the v2 that it will continue work

@lifeofmoo
Copy link

lifeofmoo commented Apr 10, 2024

For history: Fix

For the history if repo will be gone: image

Hello, I used the findings above to resolve the issue for me.

#311

Is anyone able to comment/shed light as to WHY this works. Is this is an accepted approach or a workaround?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants