Skip to content

Commit

Permalink
Reduce image size
Browse files Browse the repository at this point in the history
  • Loading branch information
hupe1980 committed Dec 30, 2021
1 parent bdf1864 commit 0bafa50
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM golang:1.17-bullseye
FROM golang:1.17-bullseye as build-env
WORKDIR /app
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY . ./
RUN GOOS=linux go build -o /scan4log4shell
RUN CGO_ENABLED=0 GOOS=linux go build -o /scan4log4shell
FROM scratch
COPY --from=build-env /scan4log4shell /scan4log4shell
ENTRYPOINT ["/scan4log4shell"]

0 comments on commit 0bafa50

Please sign in to comment.