Build a smaller Docker image

This commit is contained in:
Gabe Cook 2025-03-17 00:40:14 -05:00
parent a3d86cb7d7
commit 92f89bb313
No known key found for this signature in database
GPG key ID: 3197318BDE319B8D

View file

@ -2,7 +2,7 @@ FROM golang:alpine AS builder
RUN apk add build-base
COPY . /src
RUN cd /src/cmd/WatchYourLAN/ && CGO_ENABLED=0 go build -o /WatchYourLAN .
RUN cd /src/cmd/WatchYourLAN/ && CGO_ENABLED=0 go build -ldflags='-w -s' -o /WatchYourLAN .
FROM alpine
@ -14,4 +14,4 @@ RUN apk add --no-cache arp-scan tzdata \
COPY --from=builder /WatchYourLAN /app/
ENTRYPOINT ["./WatchYourLAN"]
ENTRYPOINT ["./WatchYourLAN"]