@@ -1,7 +1,9 @@
|
||||
FROM golang:1.23-alpine AS build
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/control .
|
||||
RUN go test ./... && \
|
||||
go vet ./... && \
|
||||
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o /out/control .
|
||||
FROM alpine:3.21
|
||||
RUN addgroup -S app && adduser -S -G app app
|
||||
COPY --from=build /out/control /usr/local/bin/control
|
||||
|
||||
Reference in New Issue
Block a user