-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Description
Official custom frontends don't seem to be published for Windows yet, so I applied the following patch to publish my own at ghcr.io/pl4nty/dockerfile:master
using frontend/dockerfile/cmd/dockerfile-frontend/hack/release
.
frontend/dockerfile/cmd/dockerfile-frontend/Dockerfile
-ARG TARGETPLATFORM
+ARG TARGETPLATFORM TARGETOS
RUN --mount=target=. --mount=type=cache,target=/root/.cache \
--mount=target=/go/pkg/mod,type=cache \
--mount=source=/tmp/.ldflags,target=/tmp/.ldflags,from=version \
- CGO_ENABLED=0 xx-go build -o /dockerfile-frontend -ldflags "-d $(cat /tmp/.ldflags)" -tags "$BUILDTAGS netgo static_build osusergo" ./frontend/dockerfile/cmd/dockerfile-frontend && \
+ CGO_ENABLED=0 xx-go build -o /dockerfile-frontend -ldflags '$([ "$TARGETOS" = "windows" ] && "" || "-d ")$(cat /tmp/.ldflags)' -tags "$BUILDTAGS netgo static_build osusergo" ./frontend/dockerfile/cmd/dockerfile-frontend && \
xx-verify --static /dockerfile-frontend
Attempts to use it fail with the following error:
echo "# syntax=ghcr.io/pl4nty/dockerfile:master" > Dockerfile
docker buildx build .
[+] Building 2.6s (4/4) FINISHED remote:nsc-remote
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 80B 0.0s
=> resolve image config for docker-image://ghcr.io/pl4nty/dockerfile:master 1.8s
=> [auth] pl4nty/dockerfile:pull token for ghcr.io 0.0s
=> docker-image://ghcr.io/pl4nty/dockerfile:master@sha256:d8f195c869e936b277f8af94493f8e0e5d58864de916a7ead70b4b 0.7s
=> => resolve ghcr.io/pl4nty/dockerfile:master@sha256:d8f195c869e936b277f8af94493f8e0e5d58864de916a7ead70b4b0708 0.0s
=> => extracting sha256:6c11bae004a3c15df19ad2d172c417f04ad12fa661e9029c2a424e3f3155705a 0.6s
WARNING: No output specified with remote 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
Dockerfile:1
--------------------
1 | >>> # syntax=ghcr.io/pl4nty/dockerfile:master
2 |
--------------------
ERROR: failed to solve: hcsshim::ProcessBaseLayer \\?\C:\ProgramData\containerd\root\io.containerd.snapshotter.v1.windows\snapshots\6: The system cannot find the path specified.: unknown
I've followed the WCOW setup guide and replicated locally and on GitHub Actions. C:\ProgramData\containerd\root\io.containerd.snapshotter.v1.windows\snapshots
exists locally, but only contains a 1
folder. I noticed the number increments after each build.
mtttcgcg, profnandaa, gkowarzyk, iancward and austindrenski