nestybox / nestybox/sysbox

Odd behavior with Docker BuildKit

Open
#674 2 comments 0 reactions 1 assignee View on GitHub

@ctalledo is already working on this.

Since Apr 18, 2023.

bug
Dominant language
Shell
Stars
3.9k
Forks
230
Avg merge
7h 48m
Merged PRs (30d)
3

Description

I'm not sure what's going on, but I am seeing odd behavior when building Docker images with Buildkit when the build context. For example, if I specify ../ as my context COPY commands seem to ignore the context, saying the files don't exist. And in other cases, it might say my Dockerfile doesn't exist at the specified path even though it definitely does exist at that path.

Steps to reproduce:

  1. Create aGitHub Actions Runner in K8s running on a Sysbox node (you can probably just run any docker-enabled container on a Sysbox node but I have not verified that)
  2. Run these commands:
mkdir -p deleteme
mkdir -p deleteme/nested
echo 'FROM busybox' > deleteme/Dockerfile
cd deleteme/nested
DOCKER_BUILDKIT=1 docker build -f ../Dockerfile ../../

You will see an error like

failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount889775149/Dockerfile: no such file or directory

If you instead run these commands on a similar pod without Sysbox, it works fine. Or if you, for example, disable Buildkit or change the Dockerfile path to be an absolute path on a pod using Sysbox, things will work fine.

Original mention in Github ARC issue: https://github.com/actions/actions-runner-controller/discussions/977#discussioncomment-4793430

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.