Skip to content

Commit

Permalink
Update Dockerfile (#395)
Browse files Browse the repository at this point in the history
* Use golang:1.21.3-bullseye as base build image

* Remove TARGETARCH arg from Dockerfile
  • Loading branch information
MrAlias authored Oct 19, 2023
1 parent 664b363 commit b4736c4
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
FROM debian:12 as builder
ARG TARGETARCH
RUN apt-get update && apt-get install -y curl clang gcc llvm make libbpf-dev -y
RUN curl -LO https://go.dev/dl/go1.20.linux-${TARGETARCH}.tar.gz && tar -C /usr/local -xzf go*.linux-${TARGETARCH}.tar.gz
ENV PATH="/usr/local/go/bin:${PATH}"
FROM golang:1.21.3-bullseye as builder

WORKDIR /app

RUN apt-get update && apt-get install -y curl clang gcc llvm make libbpf-dev

# pre-copy/cache go.mod for pre-downloading dependencies and only redownloading
# them in subsequent builds if they change
COPY go.mod go.sum ./
RUN go mod download && go mod verify

COPY . .
RUN make build

Expand Down

0 comments on commit b4736c4

Please sign in to comment.