Skip to content

Conversation

@krezef4l
Copy link
Contributor

No description provided.

@krezef4l krezef4l requested a review from pirog-spb January 14, 2025 08:48
@krezef4l krezef4l self-assigned this Jan 14, 2025
Copy link
Contributor

@yoursunny yoursunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's unnecessary to maintain separate Dockerfiles for amd64 and arm64.
Instead, use dpkg-architecture command (and possibly some if-else conditions) so that you can have a single Dockerfile for all architectures.

# Install dependencies for ebpf compilation
RUN apt update \
&& apt install --no-install-recommends -y clang llvm gcc libbpf-dev \
&& rm -rf /var/lib/apt/lists/*
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You deleted the apt cache here, and then populated the apt cache again on line10.


RUN apt-get update && apt-get install -y linux-headers-arm64

RUN ln -s /usr/include/aarch64-linux-gnu/asm/ /usr/include/asm \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

aarch64-linux-gnu => $(dpkg-architecture -qDEB_TARGET_MULTIARCH)

&& apt install --no-install-recommends -y clang llvm gcc libbpf-dev \
&& rm -rf /var/lib/apt/lists/*

RUN apt-get update && apt-get install -y linux-headers-arm64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

arm64 => $(dpkg-architecture -qDEB_TARGET_ARCH_CPU)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants