File tree Expand file tree Collapse file tree 3 files changed +20
-22
lines changed Expand file tree Collapse file tree 3 files changed +20
-22
lines changed Original file line number Diff line number Diff line change @@ -10,15 +10,19 @@ FROM mirror.gcr.io/debian:trixie
1010MAINTAINER "KernelCI TSC" <kernelci-tsc @groups.io >
1111ENV DEBIAN_FRONTEND=noninteractive
1212
13+ # Exclude doc and man files to reduce image size
14+ RUN echo 'path-exclude=/usr/share/doc/*' > /etc/dpkg/dpkg.cfg.d/excludes && \
15+ echo 'path-exclude=/usr/share/man/*' >> /etc/dpkg/dpkg.cfg.d/excludes && \
16+ echo 'path-exclude=/usr/share/info/*' >> /etc/dpkg/dpkg.cfg.d/excludes
17+
1318{% - block multistage %}{% endblock %}
1419
1520# Docker for jenkins really needs procps otherwise the jenkins side fails
16- RUN apt-get update && apt-get install --no-install-recommends -y procps
17-
1821# SSL / HTTPS support
1922RUN apt-get update && apt-get install --no-install-recommends -y \
2023 apt-transport-https \
21- ca-certificates
24+ ca-certificates \
25+ procps
2226
2327{% - block packages %}{% endblock %}
2428
Original file line number Diff line number Diff line change 33{% block multistage %}
44# Build custom kmod package with compression enabled
55
6- # SSL / HTTPS support
7- RUN apt-get update && apt-get install --no-install-recommends -y \
8- apt-transport-https \
9- ca-certificates
10-
11- # Add retries
12- RUN echo 'Acquire::Retries "5";' > /etc/apt/apt.conf.d/80-retries
6+ # Add retries and deb-src entries
7+ RUN echo 'Acquire::Retries "5";' > /etc/apt/apt.conf.d/80-retries && \
8+ echo "deb-src http://deb.debian.org/debian trixie main non-free contrib" \
9+ >> /etc/apt/sources.list && \
10+ echo "deb-src http://deb.debian.org/debian-security/ trixie-security main contrib non-free" \
11+ >> /etc/apt/sources.list
1312
1413# Prepare environment for building packages
15- #RUN sed -i -- 's/# deb-src/deb-src/g' /etc/apt/sources.list
16- RUN echo "deb-src http://deb.debian.org/debian trixie main non-free contrib" \
17- >> /etc/apt/sources.list
18- RUN echo "deb-src http://deb.debian.org/debian-security/ trixie-security main contrib non-free" \
19- >> /etc/apt/sources.list
2014RUN apt-get update && apt-get install -y --no-install-recommends \
15+ apt-transport-https \
2116 build-essential \
17+ ca-certificates \
2218 cdbs \
2319 devscripts \
2420 equivs \
Original file line number Diff line number Diff line change 11{% - if is_debian -%}
2- # Install pip3 on Debian
3- RUN apt-get update && apt-get install --no-install-recommends -y python3-pip
2+ # Install pip3 and git on Debian
3+ RUN apt-get update && apt-get install --no-install-recommends -y \
4+ git \
5+ python3-pip
46{% - endif %}
57
68ENV PIP_BREAK_SYSTEM_PACKAGES=1
79# Install kernelci Python package from kernelci-core
810USER root
911ARG core_url=https://github.com/kernelci/kernelci-core.git
1012ARG core_rev=main
11- RUN apt-get update && apt-get install --no-install-recommends -y git
1213RUN git clone --depth=1 $core_url /tmp/kernelci-core
1314WORKDIR /tmp/kernelci-core
14- RUN git fetch origin $core_rev
15- RUN git checkout FETCH_HEAD
16- # Refresh distro pip instead of attempting an in-place upgrade
17- RUN apt-get update && apt-get install --no-install-recommends -y python3-pip
15+ RUN git fetch origin $core_rev && git checkout FETCH_HEAD
1816RUN pip3 install --upgrade setuptools wheel --break-system-packages
1917RUN python3 -m pip install .[dev] --break-system-packages --ignore-installed
2018RUN cp -R config /etc/kernelci/
You can’t perform that action at this time.
0 commit comments