moby / moby/buildkit

[build-using-dockerfile example] build fails when Dockerfile is a symlink

Open
#343 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area/dockerfile kind/bug
Dominant language
Go
Stars
10.3k
Forks
1.5k
Avg merge
1d 23h
Merged PRs (30d)
48

Description

$ echo "FROM busybox" > a
$ ln -s a Dockerfile
$ docker build .
Sending build context to Docker daemon   2.56kB                                
Step 1/1 : FROM busybox                
 ---> 8ac48589692a                     
Successfully built 8ac48589692a 
$ sudo build-using-dockerfile -t foo .                                                                                                
[+] Building 0.2s (2/2) FINISHED                                                                                                                               
 => local://context (.dockerignore)                                                                                                                       0.2s 
 => => transferring context: 02B                                                                                                                          0.1s 
 => local://dockerfile (Dockerfile)                                                                                                                       0.2s 
 => => transferring dockerfile: 42B                                                                                                                       0.0s 
error: failed to solve: rpc error: code = NotFound desc = open /tmp/buildkit-mount081176212/a: no such file or directory                                       

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.

Research direction

Start by reproducing the reported commands with a Dockerfile symlink and compare docker build with build-using-dockerfile. Trace how the build context and Dockerfile are transferred, using the reported missing target path as the failure point. Done means build-using-dockerfile successfully builds the symlinked Dockerfile case.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, dockerfile, go
Domain
build-system, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.