#error when building from dockerfile

1 messages · Page 1 of 1 (latest)

summer lake
#

heyo!
seeing this:

! failed to compute cache key: failed to calculate checksum of ref xiu55c1jq3xugon51fkqof39d::3t94q30e0knfzgbcw1w83bd6n: failed to walk /tmp/buildkit-mount1070198154/bin: lstat /tmp/buildkit-mount1070198154/bin: no such file or directory

my function looks something like this

func (m *Go) BuildContainer(src *Directory) *Container {
    return dag.Container().
        WithDirectory("/src", src).
        WithWorkdir("/src").
        Directory("/src").
        DockerBuild()
}

pretty cryptic. any ideas?

#

if i had to take a wild guess id say for some reason it's looking for a locally cached image (base of the dockerfile) and not finding it, then rather than trying to pull it just gives up

#

the url is a custom registry, but docker is properly authenticated so i don't think it's a perms issue

#
! failed to compute cache key: failed to calculate checksum of ref xiu55c1jq3xugon51fkqof39d::3t94q30e0knfzgbcw1w83bd6n: failed to walk /tmp/buildkit-mount2190520078/bin: lstat /tmp/buildkit-mount2190520078/bin: no such file or directory
  ✔ cache request: [1/4] FROM us-east1-docker.pkg.dev/projectname/docker-build/debian:11.9@sha256:fs14c00e7d455b2bc0c90ccdb9a4ced2ffdc10e562c7a84a186032 0.0s
  ✔ load cache: copy /src / 0.0s
#

replacing the private image with a public one fixed the issue

#

this also worked:

func (m *Go) TT() *Container {
    return dag.Container().From("private-repo-url")
}
#

huh! after running that last one, the first one worked. i guess it populated the cache in a way that DockerBuild() couldn't?

#

ah, nope, i lied. it seems the problematic line in the dockerfile is a COPY directive- when i add that, docker build fails.

#

oof. the directory it was trying to copy didn't exist. well this is embarrassing

eager epoch