Skip to content

Commit

Permalink
Update Dockerfile for xdp and cross compile (#4336)
Browse files Browse the repository at this point in the history
* install xdp runtime dependency for ubuntu22.04

* fix for windows

* Dockerfile based fix

* fix typo

* update for Azure pipeline

* remove unused docker image

* Use default container and few fix

* rollback where needs published image
  • Loading branch information
ami-GS authored Jun 8, 2024
1 parent 55e05ee commit 1e2c109
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 27 deletions.
16 changes: 5 additions & 11 deletions .docker/ubuntu-20.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
cppcheck \
clang-tidy \
gdb \
liblttng-ust-dev \
libssl-dev \
libnuma-dev \
&& rm -rf /var/lib/apt/lists/*

RUN gem install --version 2.8.1 dotenv
Expand All @@ -47,17 +50,8 @@ RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsof

RUN git config --global safe.directory '*'

# Stage 2: x86_64 build
FROM base AS x86_64-build

RUN apt-get update -y && apt-get install -y \
liblttng-ust-dev \
libssl-dev \
libnuma-dev \
&& rm -rf /var/lib/apt/lists/*

# Stage 3: ARM build
FROM base AS arm-build
# Stage 2-2: dependencies for cross-build
FROM base AS cross-build

RUN apt-get update && apt-get install -y \
gcc-arm-linux-gnueabihf \
Expand Down
14 changes: 7 additions & 7 deletions .docker/ubuntu-22.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
cppcheck \
clang-tidy \
gdb \
liblttng-ust-dev \
libssl-dev \
libnuma-dev \
&& rm -rf /var/lib/apt/lists/*

RUN gem install fpm
Expand All @@ -47,13 +50,10 @@ RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsof

RUN git config --global safe.directory '*'

# Stage 2: x86_64 build
FROM base AS x86_64-build
# Stage 2-1: dependencies for xdp-build
FROM base AS xdp-build

RUN apt-get update -y && apt-get install -y \
liblttng-ust-dev \
libssl-dev \
libnuma-dev \
&& echo "deb [arch=amd64] http://cz.archive.ubuntu.com/ubuntu noble main" > /etc/apt/sources.list.d/xdp.list \
&& apt-get update -y && apt-get install --no-install-recommends -y -t noble \
libnl-3-dev \
Expand All @@ -70,8 +70,8 @@ RUN apt-get update -y && apt-get install -y \
libbpf-dev \
&& rm -rf /var/lib/apt/lists/*

# Stage 3: ARM build
FROM base AS arm-build
# Stage 2-2: dependencies for cross-build
FROM base AS cross-build

RUN apt-get update && apt-get install -y \
gcc-arm-linux-gnueabihf \
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/docker-publish-xcomp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,13 @@ jobs:
fail-fast: false
matrix:
version: ['20.04', '22.04', '24.04']
target: ['x86_64', 'arm', 'cross']
target: ['xdp', 'cross']
exclude:
# cross is only for 24.04
- version: '24.04'
target: 'x86_64'
- version: '24.04'
target: 'arm'
- version: '22.04'
target: 'cross'
# 20.04 doesn't support XDP, 24.04's XDP is included in cross
- version: '20.04'
target: 'cross'
target: 'xdp'
- version: '24.04'
target: 'xdp'

name: Build
runs-on: ubuntu-latest
Expand Down

0 comments on commit 1e2c109

Please sign in to comment.