#failed to resolve dockerfile: unknown API capability exec.validexitcode in 0.14.0 engine
1 messages ยท Page 1 of 1 (latest)
yeah, it has
## Build
FROM jfrog.com/projects/golang/golang-ci:1.21 AS build
WORKDIR /app
COPY go.mod .
COPY *.go ./
RUN go build -ldflags='-extldflags=-static -s' -tags osusergo,netgo,static_build
## Deploy
FROM scratch
WORKDIR /app
COPY --from=build /app/app1 /app
EXPOSE 80
ENTRYPOINT ["/app/app1
"]```
@timid badger new engine is in production and its imptacting some customers, any way we can fix this quickly?
i would recommend downgrading if it's an urgent resolution
i'm looking into this now, but we won't be able to ship a fix till later in the week
for now i have asked customers to remove that line, do you want me to create a bug isuue or you have it already?
feel free to create an issue ๐
Hey @timid badger is this fix still planned for end of the week?
sorry, i haven't had time to properly dive into it
๐ @timid badger could you please give me some idea on when this fix will be shipped? ๐
i can't reproduce the issue - replied in the issue
@timid badger I cannot reproduce the issue via module api but using old sdk way I do
here's the detailed log from engine
time="2024-12-16T16:43:28Z" level=debug msg="starting container" args="[/.init /bin/dockerfile-frontend]" client_hostname=W376RQYWKP client_id=pvofi5fygtmnl70cs1ytn5thu id=vxl1am3lnp1915t3sev0hv2bd session_id=o3hy9k62jo34w1cmd56fofqt2 spanID=e1016607e39c94a5 traceID=70957693369247108f60e2781757ab31
time="2024-12-16T16:43:29Z" level=error msg="fatal error: unknown API capability exec.validexitcode\ngithub.com/moby/buildkit/util/apicaps.(*CapSet).Supports\n\t/src/util/apicaps/caps.go:111\ngithub.com/moby/buildkit/frontend/gateway/grpcclient.(*grpcClient).Solve\n\t/src/frontend/gateway/grpcclient/client.go:349\ngithub.com/moby/buildkit/frontend/dockerui.(*Client).ReadEntrypoint\n\t/src/frontend/dockerui/config.go:342\ngithub.com/moby/buildkit/frontend/dockerfile/builder.Build\n\t/src/frontend/dockerfile/builder/build.go:45\ngithub.com/moby/buildkit/frontend/gateway/grpcclient.(*grpcClient).Run\n\t/src/frontend/gateway/grpcclient/client.go:218\ngithub.com/moby/buildkit/frontend/gateway/grpcclient.RunFromEnvironment\n\t/src/frontend/gateway/grpcclient/client.go:107\nmain.main\n\t/src/frontend/dockerfile/cmd/dockerfile-frontend/main.go:29\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:267\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_arm64.s:1197\nfailed to resolve dockerfile\ngithub.com/moby/buildkit/frontend/dockerui.(*Client).ReadEntrypoint\n\t/src/frontend/dockerui/config.go:346\ngithub.com/moby/buildkit/frontend/dockerfile/builder.Build\n\t/src/frontend/dockerfile/builder/build.go:45\ngithub.com/moby/buildkit/frontend/gateway/grpcclient.(*grpcClient).Run\n\t/src/frontend/gateway/grpcclient/client.go:218\ngithub.com/moby/buildkit/frontend/gateway/grpcclient.RunFromEnvironment\n\t/src/frontend/gateway/grpcclient/client.go:107\nmain.main\n\t/src/frontend/dockerfile/cmd/dockerfile-frontend/
could you please take a look ๐
main.go:29\nruntime.main\n\t/usr/local/go/src/runtime/proc.go:267\nruntime.goexit\n\t/usr/local/go/src/runtime/asm_arm64.s:1197"
panic: failed to resolve dockerfile: unknown API capability exec.validexitcode
can you please share a full go script that you can run to reproduce it? i'm struggling to reproduce, and i'm busy atm on other regressions - so having a reproducible example is very useful
replied in the issue thread https://github.com/dagger/dagger/issues/9095#issuecomment-2551153569
just replied there
basically, we are getting error with this directive
# syntax=docker/dockerfile:1.7-labs
Some more intersting part
if the same content exist locally in Dockerfile at host machine
# syntax=docker/dockerfile:1.7-labs
FROM golang:1.23.1 as builder
and later calling this via sdk
dir := client.Host().Directory("docker-context-dir-path")
ctr := dir.DockerBuild()
it actually works, but failing when native dagger *Directory is used without using Host
yeah i think i've found the issue
Fixes #9095.
This fixes a bug where if the directory passed as a context directory had an exec anywhere in its history, it could not be built with an old syntax pragma (including docker/dockerfile:...
it'll be included in the next release
in the meantime, you can update the syntax directive to just be docker/dockerfile:1.11 or later - the issue is in 1.10 and before
Does it require engine upgrade or just sdk upgrade? right now at 0.14.0
in the meantime, you can update the syntax directive to just be docker/dockerfile:1.11 or later - the issue is in 1.10 and before
doesdocker/dockerfile:1.11has everything that this has# syntax=docker/dockerfile:1.7-labs?