https://lakefs.io/ logo
#help
Title
# help
t

Tarun Dugar

07/01/2023, 12:39 PM
Hello, I am trying to build the docker image for lakefs locally and running into the following error: RUN --mount=type=cache,target=/root/.cache/go-build --mount=type=cache,target=/go/pkg GOOS=linux GOARCH=amd64 go build -ldflags "-X github.com/treeverse/lakefs/pkg/version.Version=dev" -o lakefs ./cmd/lakefs: #0 0.818 webui/content.go712: pattern dist: no matching files found ------ Dockerfile:34 -------------------- 33 | ARG TARGETOS TARGETARCH 34 | >>> RUN --mount=type=cache,target=/root/.cache/go-build \ 35 | >>> --mount=type=cache,target=/go/pkg \ 36 | >>> GOOS=$TARGETOS GOARCH=$TARGETARCH \ 37 | >>> go build -ldflags "-X github.com/treeverse/lakefs/pkg/version.Version=${VERSION}" -o lakefs ./cmd/lakefs 38 | RUN --mount=type=cache,target=/root/.cache/go-build \ -------------------- ERROR: failed to solve: process "/bin/sh -c GOOS=$TARGETOS GOARCH=$TARGETARCH go build -ldflags \"-X github.com/treeverse/lakefs/pkg/version.Version=${VERSION}\" -o lakefs ./cmd/lakefs" did not complete successfully: exit code: 1 I have WSL running on a windows instance. Sorry if this is the wrong place to ask. Really appreciate any support. Thank you!
y

Yoni Augarten

07/01/2023, 3:11 PM
Hey @Tarun Dugar, you came to the right place! Building the docker image of lakeFS requires running some code generation steps beforehand. You can do that by running the following from the lakeFS directory:
Copy code
make gen
You should then be able to run a successful
docker build
.
17 Views