mirror of
https://github.com/renorris/openfsd
synced 2026-03-22 23:05:36 +08:00
fix dockerfile
This commit is contained in:
@@ -16,6 +16,9 @@ WORKDIR /go/src/openfsd
|
||||
# Add the sources
|
||||
COPY . .
|
||||
|
||||
# Download modules
|
||||
RUN go mod download
|
||||
|
||||
# Compile
|
||||
RUN mkdir -p build && CGO_ENABLED=0 GOOS=linux go build -v -o build/openfsd -ldflags "-s -w" main.go
|
||||
|
||||
@@ -23,7 +26,7 @@ RUN mkdir -p build && CGO_ENABLED=0 GOOS=linux go build -v -o build/openfsd -ldf
|
||||
COPY --from=upx /bin/upx /bin/upx
|
||||
|
||||
# Compress with upx
|
||||
RUN /bin/upx -v -9 openfsd
|
||||
RUN upx -v -9 build/openfsd
|
||||
|
||||
# Final distroless image
|
||||
FROM gcr.io/distroless/static-debian12
|
||||
|
||||
Reference in New Issue
Block a user