release v1.0.1

This commit is contained in:
2024-12-03 17:17:04 +06:00
parent 7a40d8d51e
commit 8758ab19ef
13 changed files with 372 additions and 52 deletions

View File

@@ -0,0 +1,25 @@
FROM --platform=${BUILDPLATFORM} golang:1.23-alpine AS builder
ARG TARGETARCH
RUN apk add git && go install mvdan.cc/garble@latest
WORKDIR /app
COPY . .
RUN echo $BUILDPLATFORM > buildplatform
RUN echo $TARGETARCH > targetarch
# RUN GOOS=linux GOARCH=$TARGETARCH go build -o output/go-ansible-vault
RUN GOOS=${TARGETOS} GOARCH=${TARGETARCH} garble -literals -tiny build -ldflags="-w -s" -o /app/go-lcg .
FROM alpine:latest
WORKDIR /root
# COPY --from=builder /app/buildplatform .
# COPY --from=builder /app/targetarch .
COPY --from=builder /app/go-lcg /root/lcg
ENTRYPOINT ["/root/lcg"]