refactor
This commit is contained in:
@@ -3,22 +3,18 @@ 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 CGO_ENABLED=0 go build -o /build/daemon . && \
|
||||
CGO_ENABLED=0 go build -o /build/auth_server ./util/
|
||||
CGO_ENABLED=0 go build -o /build/auth_server ./gitea-auth/
|
||||
|
||||
RUN CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
|
||||
go build -o /build/daemon . && \
|
||||
CGO_ENABLED=0 GOOS=$TARGETOS GOARCH=$TARGETARCH \
|
||||
go build -o /build/auth_server ./util/
|
||||
go build -o /build/auth_server ./gitea-auth/
|
||||
|
||||
FROM alpine:3.24 AS rootfs-builder
|
||||
ENV CLOUD_CONFIG_REPO="https://git.sfclub.cc/cloud/bearnet"
|
||||
ENV CLOUD_CONFIG_REVISION="wish"
|
||||
ENV CLOUD_GATEWAY_ADDRESS="10.0.0.119"
|
||||
RUN apk update && apk add alpine-make-vm-image
|
||||
COPY ./image /kitchen
|
||||
RUN sed -i "s#_REPO_#$CLOUD_CONFIG_REPO#g" /kitchen/overlay/daemon/update-keys.sh && \
|
||||
sed -i "s#_REVISION_#$CLOUD_CONFIG_REVISION#g" /kitchen/overlay/daemon/update-keys.sh && \
|
||||
sed -i "s#GATEWAY_ADDRESS#$CLOUD_GATEWAY_ADDRESS#g" /kitchen/overlay/etc/network/interfaces
|
||||
COPY .env /kitchen/.env
|
||||
RUN sh /kitchen/substitution.sh < /kitchen/.env
|
||||
COPY --from=bubble-builder --chmod=755 /build/daemon /kitchen/overlay/usr/bin/bubble
|
||||
COPY --from=bubble-builder --chmod=755 /build/auth_server /kitchen/overlay/usr/bin/auth-server
|
||||
COPY ./secret/* /kitchen/overlay/etc/ssh/
|
||||
|
||||
Reference in New Issue
Block a user