Skip to content

Commit 79ceb82

Browse files
committed
update: improve dockerfile size
1 parent be0df1e commit 79ceb82

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
1-
FROM golang:1.23-alpine
1+
FROM golang:1.23-alpine AS builder
22

33
WORKDIR /src/
44
COPY . /src/
55

66
RUN apk add --update gcc musl-dev
77
RUN CGO_ENABLED=1 go build -o /bin/nmap-formatter
88

9+
FROM golang:1.23-alpine
10+
11+
COPY --from=builder /bin/nmap-formatter /bin/nmap-formatter
12+
913
ENTRYPOINT ["/bin/nmap-formatter"]

0 commit comments

Comments
 (0)