cirrus: Use ccache for faster container builds

This commit is contained in:
Arne Welzel 2023-01-31 11:45:17 +01:00
parent 5510b2496a
commit 7651c46314
3 changed files with 89 additions and 5 deletions

29
docker/builder.Dockerfile Normal file
View file

@ -0,0 +1,29 @@
# See the file "COPYING" in the main distribution directory for copyright.
# Layer to build Zeek.
FROM debian:bullseye-slim
# Configure system for build.
RUN apt-get -q update \
&& apt-get install -q -y --no-install-recommends \
bind9 \
bison \
ccache \
cmake \
flex \
g++ \
gcc \
libfl2 \
libfl-dev \
libmaxminddb-dev \
libpcap-dev \
libssl-dev \
libz-dev \
make \
python3-minimal \
python3.9-dev \
swig \
ninja-build \
python3-pip \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

25
docker/final.Dockerfile Normal file
View file

@ -0,0 +1,25 @@
# See the file "COPYING" in the main distribution directory for copyright.
# Final layer containing all artifacts.
FROM debian:bullseye-slim
RUN apt-get -q update \
&& apt-get install -q -y --no-install-recommends \
ca-certificates \
git \
libmaxminddb0 \
libpython3.9 \
libpcap0.8 \
libssl1.1 \
libz1 \
python3-minimal \
python3-git \
python3-semantic-version \
python3-websocket \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Copy over Zeek installation from build
COPY --from=zeek-build /usr/local/zeek /usr/local/zeek
ENV PATH "/usr/local/zeek/bin:${PATH}"
ENV PYTHONPATH "/usr/local/zeek/lib/zeek/python:${PYTHONPATH}"