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

failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: #179

Closed
kylemiller3 opened this issue Oct 17, 2020 · 2 comments

Comments

@kylemiller3
Copy link

Troubleshooting

I copied a standard yaml file to use and checked out issue #164
My repo has a Dockerfile in the top directory
screenshot_20201017_020934

Expected behaviour

A successful build

Actual behaviour

It throws an error

Configuration

name: ci

on:
  push:
    branches: master

jobs:
  main:
    runs-on: ubuntu-latest
    steps:
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v1
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      -
        name: Login to DockerHub
        uses: docker/login-action@v1 
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Build and push
        id: docker_build
        uses: docker/build-push-action@v2
        with:
          context: .
          file: ./Dockerfile
          push: true
          tags: ***/***
      -
        name: Image digest
        run: echo ${{ steps.docker_build.outputs.digest }}

Logs

2020-10-17T05:38:52.6581839Z ##[section]Starting: Request a runner to run this job
2020-10-17T05:38:52.8625031Z Can't find any online and idle self-hosted runner in current repository that matches the required labels: 'ubuntu-latest'
2020-10-17T05:38:52.8625138Z Can't find any online and idle self-hosted runner in current repository's account/organization that matches the required labels: 'ubuntu-latest'
2020-10-17T05:38:52.8625351Z Found online and idle hosted runner in current repository's account/organization that matches the required labels: 'ubuntu-latest'
2020-10-17T05:38:52.9757770Z ##[section]Finishing: Request a runner to run this job
2020-10-17T05:38:58.2169403Z Current runner version: '2.273.5'
2020-10-17T05:38:58.2200732Z ##[group]Operating System
2020-10-17T05:38:58.2201623Z Ubuntu
2020-10-17T05:38:58.2202022Z 18.04.5
2020-10-17T05:38:58.2202380Z LTS
2020-10-17T05:38:58.2202749Z ##[endgroup]
2020-10-17T05:38:58.2203203Z ##[group]Virtual Environment
2020-10-17T05:38:58.2203762Z Environment: ubuntu-18.04
2020-10-17T05:38:58.2204218Z Version: 20201012.1
2020-10-17T05:38:58.2205103Z Included Software: https://github.com/actions/virtual-environments/blob/ubuntu18/20201012.1/images/linux/Ubuntu1804-README.md
2020-10-17T05:38:58.2206001Z ##[endgroup]
2020-10-17T05:38:58.2207421Z Prepare workflow directory
2020-10-17T05:38:58.2449477Z Prepare all required actions
2020-10-17T05:38:58.2460625Z Getting action download info
2020-10-17T05:38:58.4773286Z Download action repository 'docker/setup-qemu-action@v1'
2020-10-17T05:39:00.4831786Z Download action repository 'docker/setup-buildx-action@v1'
2020-10-17T05:39:00.6492855Z Download action repository 'docker/login-action@v1'
2020-10-17T05:39:00.8430422Z Download action repository 'docker/build-push-action@v2'
2020-10-17T05:39:01.1441380Z ##[group]Run docker/setup-qemu-action@v1
2020-10-17T05:39:01.1442103Z with:
2020-10-17T05:39:01.1442668Z   image: tonistiigi/binfmt:latest
2020-10-17T05:39:01.1443082Z   platforms: all
2020-10-17T05:39:01.1443420Z ##[endgroup]
2020-10-17T05:39:01.9889913Z 💎 Installing QEMU static binaries...
2020-10-17T05:39:01.9938141Z [command]/usr/bin/docker run --rm --privileged tonistiigi/binfmt:latest --install all
2020-10-17T05:39:04.6733686Z Unable to find image 'tonistiigi/binfmt:latest' locally
2020-10-17T05:39:04.9652466Z latest: Pulling from tonistiigi/binfmt
2020-10-17T05:39:05.1187166Z 9cc57093ca8c: Pulling fs layer
2020-10-17T05:39:05.1187883Z b78aa434a304: Pulling fs layer
2020-10-17T05:39:05.2739166Z b78aa434a304: Verifying Checksum
2020-10-17T05:39:05.2740402Z b78aa434a304: Download complete
2020-10-17T05:39:05.3634605Z 9cc57093ca8c: Verifying Checksum
2020-10-17T05:39:05.3653975Z 9cc57093ca8c: Download complete
2020-10-17T05:39:05.6504230Z 9cc57093ca8c: Pull complete
2020-10-17T05:39:05.7619412Z b78aa434a304: Pull complete
2020-10-17T05:39:05.7666931Z Digest: sha256:df15403e06a03c2f461c1f7938b171fda34a5849eb63a70e2a2109ed5a778bde
2020-10-17T05:39:05.7688272Z Status: Downloaded newer image for tonistiigi/binfmt:latest
2020-10-17T05:39:07.6365768Z 2020/10/17 05:39:07 installing: arm OK
2020-10-17T05:39:07.6366835Z 2020/10/17 05:39:07 installing: s390x OK
2020-10-17T05:39:07.6367717Z 2020/10/17 05:39:07 installing: ppc64le OK
2020-10-17T05:39:07.6370895Z 2020/10/17 05:39:07 installing: riscv64 OK
2020-10-17T05:39:07.6372066Z 2020/10/17 05:39:07 installing: arm64 OK
2020-10-17T05:39:07.6576241Z {
2020-10-17T05:39:07.6585201Z   "supported": [
2020-10-17T05:39:07.6585629Z     "linux/amd64",
2020-10-17T05:39:07.6586203Z     "linux/arm64",
2020-10-17T05:39:07.6586647Z     "linux/riscv64",
2020-10-17T05:39:07.6587224Z     "linux/ppc64le",
2020-10-17T05:39:07.6587618Z     "linux/s390x",
2020-10-17T05:39:07.6587997Z     "linux/386",
2020-10-17T05:39:07.6588560Z     "linux/arm/v7",
2020-10-17T05:39:07.6589048Z     "linux/arm/v6"
2020-10-17T05:39:07.6602863Z   ],
2020-10-17T05:39:07.6603214Z   "emulators": [
2020-10-17T05:39:07.6603574Z     "cli",
2020-10-17T05:39:07.6604765Z     "llvm-6.0-runtime.binfmt",
2020-10-17T05:39:07.6605431Z     "llvm-8-runtime.binfmt",
2020-10-17T05:39:07.6606219Z     "llvm-9-runtime.binfmt",
2020-10-17T05:39:07.6606801Z     "python2.7",
2020-10-17T05:39:07.6607115Z     "python3.6",
2020-10-17T05:39:07.6607841Z     "qemu-aarch64",
2020-10-17T05:39:07.6608323Z     "qemu-arm",
2020-10-17T05:39:07.6608799Z     "qemu-ppc64le",
2020-10-17T05:39:07.6609484Z     "qemu-riscv64",
2020-10-17T05:39:07.6609974Z     "qemu-s390x"
2020-10-17T05:39:07.6610289Z   ]
2020-10-17T05:39:07.6610689Z }
2020-10-17T05:39:07.8598096Z 🛒 Extracting available platforms...
2020-10-17T05:39:08.4596693Z linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
2020-10-17T05:39:08.5002360Z ##[group]Run docker/setup-buildx-action@v1
2020-10-17T05:39:08.5002962Z with:
2020-10-17T05:39:08.5003299Z   driver: docker-container
2020-10-17T05:39:08.5004240Z   buildkitd-flags: --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
2020-10-17T05:39:08.5005118Z   install: false
2020-10-17T05:39:08.5005396Z   use: true
2020-10-17T05:39:08.5005661Z ##[endgroup]
2020-10-17T05:39:11.0856620Z 📣 Buildx version: 0.4.2
2020-10-17T05:39:11.3686231Z 🔨 Creating a new builder instance...
2020-10-17T05:39:11.3726909Z [command]/usr/bin/docker buildx create --name builder-main-2 --driver docker-container --driver-opt image=moby/buildkit:v0.8-beta --buildkitd-flags --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host --use
2020-10-17T05:39:11.5166275Z builder-main-2
2020-10-17T05:39:11.5242447Z 🏃 Booting builder...
2020-10-17T05:39:11.5264552Z [command]/usr/bin/docker buildx inspect --bootstrap
2020-10-17T05:39:11.6331442Z #1 [internal] booting buildkit
2020-10-17T05:39:11.7832926Z #1 pulling image moby/buildkit:v0.8-beta
2020-10-17T05:39:13.8882309Z #1 pulling image moby/buildkit:v0.8-beta 2.1s done
2020-10-17T05:39:13.8883408Z #1 creating container buildx_buildkit_builder-main-20
2020-10-17T05:39:16.0962221Z #1 creating container buildx_buildkit_builder-main-20 2.3s done
2020-10-17T05:39:16.0962743Z #1 DONE 4.5s
2020-10-17T05:39:16.2341965Z Name:   builder-main-2
2020-10-17T05:39:16.2342614Z Driver: docker-container
2020-10-17T05:39:16.2342893Z 
2020-10-17T05:39:16.2343143Z Nodes:
2020-10-17T05:39:16.2343633Z Name:      builder-main-20
2020-10-17T05:39:16.2344082Z Endpoint:  unix:///var/run/docker.sock
2020-10-17T05:39:16.2344557Z Status:    running
2020-10-17T05:39:16.2345755Z Flags:     --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host
2020-10-17T05:39:16.2346980Z Platforms: linux/amd64, linux/arm64, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/arm/v7, linux/arm/v6
2020-10-17T05:39:16.2457576Z 🛒 Extracting available platforms...
2020-10-17T05:39:16.5073617Z linux/amd64,linux/arm64,linux/riscv64,linux/ppc64le,linux/s390x,linux/386,linux/arm/v7,linux/arm/v6
2020-10-17T05:39:16.5361243Z ##[group]Run docker/login-action@v1
2020-10-17T05:39:16.5361649Z with:
2020-10-17T05:39:16.5362742Z   username: ***
2020-10-17T05:39:16.5363237Z   password: ***
2020-10-17T05:39:16.5363537Z   logout: true
2020-10-17T05:39:16.5367927Z ##[endgroup]
2020-10-17T05:39:16.5931393Z 🔑 Logging into DockerHub...
2020-10-17T05:39:16.8083786Z 🎉 Login Succeeded!
2020-10-17T05:39:16.8214255Z ##[group]Run docker/build-push-action@v2
2020-10-17T05:39:16.8214669Z with:
2020-10-17T05:39:16.8214932Z   context: .
2020-10-17T05:39:16.8215409Z   file: ./Dockerfile
2020-10-17T05:39:16.8215712Z   push: true
2020-10-17T05:39:16.8216188Z   tags: ***/***
2020-10-17T05:39:16.8216566Z   pull: false
2020-10-17T05:39:16.8216863Z   no-cache: false
2020-10-17T05:39:16.8217158Z   load: false
2020-10-17T05:39:16.8217912Z   github-token: ***
2020-10-17T05:39:16.8218262Z ##[endgroup]
2020-10-17T05:39:17.1578618Z 📣 Buildx version: 0.4.2
2020-10-17T05:39:17.1579266Z 🏃 Starting build...
2020-10-17T05:39:17.1601524Z [command]/usr/bin/docker buildx build --tag ***/*** --iidfile /tmp/docker-build-push-8dBNaa/iidfile --file ./Dockerfile --push .
2020-10-17T05:39:17.2639920Z time="2020-10-17T05:39:17Z" level=warning msg="invalid non-bool value for BUILDX_NO_DEFAULT_LOAD: "
2020-10-17T05:39:17.3555955Z #1 [internal] load .dockerignore
2020-10-17T05:39:17.3972512Z #1 transferring context: 2B 0.0s done
2020-10-17T05:39:17.3981378Z #1 DONE 0.0s
2020-10-17T05:39:17.3981961Z 
2020-10-17T05:39:17.3983509Z #2 [internal] load build definition from Dockerfile
2020-10-17T05:39:17.3984523Z #2 transferring dockerfile: 2B 0.0s done
2020-10-17T05:39:17.3985031Z #2 DONE 0.0s
2020-10-17T05:39:17.3987736Z failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /tmp/buildkit-mount923342623/Dockerfile: no such file or directory
2020-10-17T05:39:17.4062316Z ##[error]The process '/usr/bin/docker' failed with exit code 1
2020-10-17T05:39:17.4376406Z Post job cleanup.
2020-10-17T05:39:17.5255655Z 🚿 Removing temp folder /tmp/docker-build-push-8dBNaa
2020-10-17T05:39:17.5346567Z Post job cleanup.
2020-10-17T05:39:17.5943194Z [command]/usr/bin/docker logout 
2020-10-17T05:39:17.6621362Z Removing login credentials for https://index.docker.io/v1/
2020-10-17T05:39:17.6781968Z Post job cleanup.
2020-10-17T05:39:17.7569776Z [command]/usr/bin/docker buildx rm builder-main-2
2020-10-17T05:39:18.1155952Z Cleaning up orphan processes
@crazy-max
Copy link
Member

crazy-max commented Oct 17, 2020

@kylemiller3 Same as #164 (comment). You need to add the Checkout step for Path context:

name: ci

on:
  push:
    branches: master

jobs:
  main:
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v2
      -
        name: Set up QEMU
        uses: docker/setup-qemu-action@v1
      -
        name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v1
      -
        name: Login to DockerHub
        uses: docker/login-action@v1 
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      -
        name: Build and push
        id: docker_build
        uses: docker/build-push-action@v2
        with:
          context: .
          file: ./Dockerfile
          push: true
          tags: ***/***
      -
        name: Image digest
        run: echo ${{ steps.docker_build.outputs.digest }}

@kylemiller3
Copy link
Author

kylemiller3 commented Oct 17, 2020

Sorry about the spam; I somehow missed that. Guess it was pretty late. Thank you.

cooperlees added a commit to psf/black that referenced this issue Apr 25, 2021
- Reading my error others hit it by forgetting this Checkoutstep too so trying the fix
  - e.g. docker/build-push-action#179
- Makes sense it's needed
ambv pushed a commit to psf/black that referenced this issue Apr 25, 2021
- Reading my error others hit it by forgetting this Checkoutstep too so trying the fix
  - e.g. docker/build-push-action#179
- Makes sense it's needed
couponsdiscountspromocodesdiscounts2 added a commit to couponsdiscountspromocodesdiscounts2/black that referenced this issue Aug 16, 2024
- Reading my error others hit it by forgetting this Checkoutstep too so trying the fix
  - e.g. docker/build-push-action#179
- Makes sense it's needed
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

No branches or pull requests

2 participants