dalec icon indicating copy to clipboard operation
dalec copied to clipboard

[BUG] Docs for building testing frontend image appears to be incorrect

Open invidian opened this issue 3 weeks ago • 1 comments

Expected Behavior

Running example from https://project-dalec.github.io/dalec/developers#5-test-frontend-image runs frontend with locally made changes.

Actual Behavior

Docker prints error:

$ make frontend && docker build -t go-md2man:test --build-arg BUILDKIT_SYNTAX=local/dalec/frontend -f docs/examples/go-md2man.yml --target=azlinux3/container -t go-md2man:test .
FRONTEND_REF=local/dalec/frontend docker buildx bake frontend
[+] Building 0.6s (10/10) FINISHED                                                                                                                                                                                                      docker-container:retina
 => [internal] load local bake definitions                                                                                                                                                                                                                 0.0s
 => => reading docker-bake.hcl 7.23kB / 7.23kB                                                                                                                                                                                                             0.0s
 => [internal] load build definition from Dockerfile                                                                                                                                                                                                       0.0s
 => => transferring dockerfile: 760B                                                                                                                                                                                                                       0.0s
 => [internal] load metadata for docker.io/library/golang:1.24@sha256:5056a223ebbba06c4441cda05dc0a99f77896dde04472710f02ea30c47f7be00                                                                                                                     0.0s
 => [internal] load .dockerignore                                                                                                                                                                                                                          0.0s
 => => transferring context: 134B                                                                                                                                                                                                                          0.0s
 => [go 1/1] FROM docker.io/library/golang:1.24@sha256:5056a223ebbba06c4441cda05dc0a99f77896dde04472710f02ea30c47f7be00                                                                                                                                    0.0s
 => => resolve docker.io/library/golang:1.24@sha256:5056a223ebbba06c4441cda05dc0a99f77896dde04472710f02ea30c47f7be00                                                                                                                                       0.0s
 => [internal] load build context                                                                                                                                                                                                                          0.2s
 => => transferring context: 262.44kB                                                                                                                                                                                                                      0.1s
 => CACHED [frontend-build 1/3] WORKDIR /build                                                                                                                                                                                                             0.0s
 => CACHED [frontend-build 2/3] COPY . .                                                                                                                                                                                                                   0.0s
 => CACHED [frontend-build 3/3] RUN     --mount=type=cache,target=/go/pkg/mod     --mount=type=cache,target=/root/.cache/go-build     go build -o /frontend ./cmd/frontend                                                                                 0.0s
 => CACHED [frontend 1/1] COPY --from=frontend-build /frontend /frontend                                                                                                                                                                                   0.0s
WARNING: No output specified for frontend target(s) with docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load
[+] Building 1.0s (1/1) FINISHED                                                                                                                                                                                                                 docker:default
 => ERROR resolve image config for docker-image://docker.io/local/dalec/frontend:latest                                                                                                                                                                    0.9s
------
 > resolve image config for docker-image://docker.io/local/dalec/frontend:latest:
------
ERROR: failed to build: failed to solve: failed to resolve source metadata for docker.io/local/dalec/frontend:latest: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

Steps To Reproduce

  1. Run make frontend && docker build -t go-md2man:test --build-arg BUILDKIT_SYNTAX=local/dalec/frontend -f docs/examples/go-md2man.yml --target=azlinux3/container -t go-md2man:test .

Are you willing to submit PRs to contribute to this bug fix?

  • [ ] Yes, I am willing to implement it.

invidian avatar Nov 26 '25 16:11 invidian

Hm, it seems to be caused because my default buildx builder was using docker-container driver, not docker.

invidian avatar Nov 26 '25 18:11 invidian

In general I'd recommend using the integration tests for specific things since this wires up the frontend automatically. That said, if you just want to make sure you didn't break something, docker buildx bake examples works. This also wires up the local frontend changes into the build automatically.

cpuguy83 avatar Dec 01 '25 18:12 cpuguy83

docker buildx bake examples is fine, thanks for sharing, but it does not allow e.g. customizing the target (e.g. switching from azlinux3/container to e.g. trixie/testing/container).

I'll create a docs PR to clarify that for running make frontend you need docker driver and that you can use bake alternatively, with limitations.

invidian avatar Dec 05 '25 14:12 invidian