Skip to content

Commit

Permalink
Update lemming base image (#487)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanG100 authored Oct 24, 2024
1 parent 30bd507 commit fb2dfe2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Dockerfile.lemming
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
FROM docker.io/golang:1.21-bullseye AS build
FROM docker.io/golang:1.22-bookworm AS build
WORKDIR /build
COPY go.* ./
RUN go mod download
COPY . .

FROM build as release-build
RUN apt-get update && apt-get install -y libpcap-dev
RUN go install github.com/google/go-licenses@latest
RUN --mount=type=cache,target=/root/.cache/go-build go build -o /out/lemming ./cmd/lemming
RUN go-licenses save ./cmd/lemming --save_path THIRD_PARTY_LICENSES
Expand All @@ -13,10 +14,12 @@ FROM build as debug-build
RUN go install github.com/go-delve/delve/cmd/dlv@latest
RUN --mount=type=cache,target=/root/.cache/go-build go build -gcflags='all=-N -l' -o /out/lemming ./cmd/lemming

FROM docker.io/debian:bullseye as debug
FROM docker.io/debian:bookworm as debug
RUN apt-get update && apt-get install -y libpcap-dev
COPY --from=debug-build /out/lemming /lemming/lemming
COPY --from=debug-build /go/bin/dlv /dlv/dlv

FROM docker.io/debian:bullseye as release
FROM docker.io/debian:bookworm as release
RUN apt-get update && apt-get install -y libpcap-dev
COPY --from=release-build /out/lemming /lemming/lemming
COPY --from=release-build /build/THIRD_PARTY_LICENSES /lemming/THIRD_PARTY

0 comments on commit fb2dfe2

Please sign in to comment.