fix build issue
This commit is contained in:
@@ -1,14 +1,10 @@
|
||||
FROM golang:1.25-alpine AS bubble-builder
|
||||
|
||||
WORKDIR /src
|
||||
RUN apk add git && git clone https://github.com/iceBear67/bubble && go mod download && mkdir /build
|
||||
RUN apk add git && git clone https://github.com/iceBear67/bubble . && go mod download && mkdir /build
|
||||
RUN CGO_ENABLED=0 go build -o /build/daemon . && \
|
||||
CGO_ENABLED=0 go build -o /build/auth_server ./util/
|
||||
|
||||
COPY . .
|
||||
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
|
||||
go build -o /build/daemon . && \
|
||||
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
|
||||
@@ -26,6 +22,8 @@ RUN sed -i "s#_REPO_#$CLOUD_CONFIG_REPO#g" /kitchen/overlay/daemon/update-keys.s
|
||||
COPY --from=bubble-builder /build/daemon /bin/bubble
|
||||
COPY --from=bubble-builder /build/auth_server /bin/auth-server
|
||||
RUN --security=insecure \
|
||||
--mount=type=bind,from=host-modules,source=/,target=/lib/modules \
|
||||
cd /kitchen && rm -f vm.raw && ./build-image.sh
|
||||
|
||||
|
||||
FROM scratch AS export
|
||||
COPY --from=rootfs-builder /kitchen/vm.raw /vm.raw
|
||||
|
||||
Reference in New Issue
Block a user