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

Follow building best practices #16

Merged
merged 1 commit into from
Jul 21, 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
25 changes: 14 additions & 11 deletions gmon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,22 @@ image_buildenv=gmon-buildenv-$arch
dockerfile_buildenv=$(mktemp)
cat > "$dockerfile_buildenv" <<EOF
FROM debian:bookworm-20240513@sha256:fac2c0fd33e88dfd3bc88a872cfb78dcb167e74af6162d31724df69e482f886c
RUN apt-get update && apt-get install -y --no-install-recommends \
git \
wget \
llvm-14 \
RUN <<END
apt-get update
apt-get install -y --no-install-recommends \
ca-certificates \
clang-14 \
clang-format-14 \
git \
libbpf-dev \
ca-certificates \
clang-format-14 && \
ln -s /usr/bin/llvm-strip-14 /usr/bin/llvm-strip && \
ln -s /usr/bin/clang-14 /usr/bin/clang && \
ln -s /usr/bin/clang-format-14 /usr/bin/clang-format
RUN wget -O- --no-check-certificate https://github.com/libbpf/bpftool/releases/download/v7.3.0/bpftool-v7.3.0-amd64.tar.gz | tar -xzf - -C /usr/bin && chmod +x /usr/bin/bpftool
RUN wget -O- --no-check-certificate https://go.dev/dl/go1.22.3.linux-amd64.tar.gz | tar -xzf - -C /usr/local && chmod +x /usr/local/go/bin/go && ln -s /usr/local/go/bin/go /usr/bin/go
llvm-14 \
wget
ln -s /usr/bin/llvm-strip-14 /usr/bin/llvm-strip
ln -s /usr/bin/clang-14 /usr/bin/clang
ln -s /usr/bin/clang-format-14 /usr/bin/clang-format
wget -O- --no-check-certificate https://github.com/libbpf/bpftool/releases/download/v7.3.0/bpftool-v7.3.0-amd64.tar.gz | tar -xzf - -C /usr/bin && chmod +x /usr/bin/bpftool
wget -O- --no-check-certificate https://go.dev/dl/go1.22.3.linux-amd64.tar.gz | tar -xzf - -C /usr/local && chmod +x /usr/local/go/bin/go && ln -s /usr/local/go/bin/go /usr/bin/go
END
WORKDIR /usr/src
COPY go.mod go.mod
RUN go mod download
Expand Down