Skip to content

Commit

Permalink
Update Ubuntu Dockerfile to clean up apt-get statements
Browse files Browse the repository at this point in the history
Fixes #240

This commit updates the Ubuntu Dockerfile's apt-get statements
to remove potential apt refresh issus and reduces
the cndp container size by ~27% (from 147MB to 107MB)

Signed-off-by: Matthew Leon <[email protected]>
Signed-off-by: Byron Marohn <[email protected]>
Signed-off-by: Stephen Weeks <[email protected]>
Signed-off-by: Edmund Leemhuis <[email protected]>
  • Loading branch information
Matthew Leon authored and maryamtahhan committed Dec 16, 2022
1 parent 5e3b6d4 commit 25d5fef
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions containerization/docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ RUN apt-get update && apt-get install -y \
libnl-cli-3-dev \
libnuma-dev \
libpcap-dev \
wget
wget \
llvm-dev \
libclang-dev \
clang \
curl \
&& rm -rf /var/lib/apt/lists/*

# Build and install libbpf version >=0.3.0 and <=0.6.1
SHELL ["/bin/bash", "-c"]
Expand All @@ -44,10 +49,6 @@ RUN make && make install
WORKDIR /cndp/lang/go/stats/prometheus
RUN go build prometheus.go

# Install Rust bindgen dependencies.
RUN apt-get install -y \
llvm-dev libclang-dev clang curl

# Install Rust and Cargo.
RUN curl https://sh.rustup.rs -sSf | sh -s -- -y

Expand All @@ -73,7 +74,8 @@ RUN apt-get update && apt-get install -y \
libnl-3-200 \
libnl-cli-3-200 \
libnuma1 \
libpcap0.8
libpcap0.8 \
&& rm -rf /var/lib/apt/lists/*

# Copy artifacts from the build container
COPY --from=build /cndp/usr/local/bin/cndpfwd /usr/bin/
Expand Down

0 comments on commit 25d5fef

Please sign in to comment.