Skip to content
Merged
Show file tree
Hide file tree
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
10 changes: 7 additions & 3 deletions config/docker/base/debian.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,19 @@ FROM mirror.gcr.io/debian:trixie
MAINTAINER "KernelCI TSC" <[email protected]>
ENV DEBIAN_FRONTEND=noninteractive

# Exclude doc and man files to reduce image size
RUN echo 'path-exclude=/usr/share/doc/*' > /etc/dpkg/dpkg.cfg.d/excludes && \
echo 'path-exclude=/usr/share/man/*' >> /etc/dpkg/dpkg.cfg.d/excludes && \
echo 'path-exclude=/usr/share/info/*' >> /etc/dpkg/dpkg.cfg.d/excludes

{%- block multistage %}{% endblock %}

# Docker for jenkins really needs procps otherwise the jenkins side fails
RUN apt-get update && apt-get install --no-install-recommends -y procps

# SSL / HTTPS support
RUN apt-get update && apt-get install --no-install-recommends -y \
apt-transport-https \
ca-certificates
ca-certificates \
procps

{%- block packages %}{% endblock %}

Expand Down
20 changes: 8 additions & 12 deletions config/docker/base/host-tools.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,18 @@
{% block multistage %}
# Build custom kmod package with compression enabled

# SSL / HTTPS support
RUN apt-get update && apt-get install --no-install-recommends -y \
apt-transport-https \
ca-certificates

# Add retries
RUN echo 'Acquire::Retries "5";' > /etc/apt/apt.conf.d/80-retries
# Add retries and deb-src entries
RUN echo 'Acquire::Retries "5";' > /etc/apt/apt.conf.d/80-retries && \
echo "deb-src http://deb.debian.org/debian trixie main non-free contrib" \
>> /etc/apt/sources.list && \
echo "deb-src http://deb.debian.org/debian-security/ trixie-security main contrib non-free" \
>> /etc/apt/sources.list

# Prepare environment for building packages
#RUN sed -i -- 's/# deb-src/deb-src/g' /etc/apt/sources.list
RUN echo "deb-src http://deb.debian.org/debian trixie main non-free contrib" \
>> /etc/apt/sources.list
RUN echo "deb-src http://deb.debian.org/debian-security/ trixie-security main contrib non-free" \
>> /etc/apt/sources.list
RUN apt-get update && apt-get install -y --no-install-recommends \
apt-transport-https \
build-essential \
ca-certificates \
cdbs \
devscripts \
equivs \
Expand Down
12 changes: 5 additions & 7 deletions config/docker/fragment/kernelci.jinja2
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
{%- if is_debian -%}
# Install pip3 on Debian
RUN apt-get update && apt-get install --no-install-recommends -y python3-pip
# Install pip3 and git on Debian
RUN apt-get update && apt-get install --no-install-recommends -y \
git \
python3-pip
Copy link
Member

Choose a reason for hiding this comment

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

I always add this at the end just to clean up apt stuff

&& apt-get clean \
  && rm -rf \
  /var/lib/apt/lists/* \

I would also add DEBIAN_FRONTEND=noninteractive at the start of the call

Copy link
Member Author

Choose a reason for hiding this comment

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

I thought about that, but for now kept as next step, as sometimes i do apt commands later to install missing stuff, need to make sure i dont have that anymore.

{%- endif %}

ENV PIP_BREAK_SYSTEM_PACKAGES=1
# Install kernelci Python package from kernelci-core
USER root
ARG core_url=https://github.com/kernelci/kernelci-core.git
ARG core_rev=main
RUN apt-get update && apt-get install --no-install-recommends -y git
RUN git clone --depth=1 $core_url /tmp/kernelci-core
WORKDIR /tmp/kernelci-core
RUN git fetch origin $core_rev
RUN git checkout FETCH_HEAD
# Refresh distro pip instead of attempting an in-place upgrade
RUN apt-get update && apt-get install --no-install-recommends -y python3-pip
RUN git fetch origin $core_rev && git checkout FETCH_HEAD
RUN pip3 install --upgrade setuptools wheel --break-system-packages
RUN python3 -m pip install .[dev] --break-system-packages --ignore-installed
RUN cp -R config /etc/kernelci/
Expand Down