Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert dockerfile changes done in #309 #315

Merged
merged 1 commit into from
Apr 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 4 additions & 19 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,15 @@
ARG TARGETPLATFORM=linux/amd64
ARG BUILDPLATFORM=linux/amd64
ARG TARGETARCH=amd64
ARG GOVERSION="1.21.7"

# Build layer
FROM --platform=$TARGETPLATFORM fedora:39 as builder
# Build the manager binary
FROM --platform=$BUILDPLATFORM docker.io/library/golang:1.21 as builder


ARG TARGETARCH
ARG TARGETPLATFORM
ARG GOVERSION
ARG VERSION="unknown"

RUN dnf install -y git go kernel-devel make llvm clang unzip
RUN dnf clean all

WORKDIR /

RUN curl -qL https://go.dev/dl/go$GOVERSION.linux-$TARGETARCH.tar.gz -o go.tar.gz
RUN tar -xzf go.tar.gz
RUN rm go.tar.gz

ENV GOROOT /go
RUN mkdir -p /gopath
ENV GOPATH /gopath
ENV PATH $GOROOT/bin:$GOPATH/bin:$PATH

WORKDIR /opt/app-root

# Copy the go manifests and source
Expand All @@ -39,7 +25,6 @@ COPY Makefile Makefile
COPY .mk/ .mk/

# Build
RUN make gen-bpf
RUN GOARCH=$TARGETARCH make compile

# Create final image from minimal + built binary
Expand Down
Loading