Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge all into main #298

Merged
merged 7 commits into from
Jun 22, 2024
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
5 changes: 3 additions & 2 deletions Dockerfile.acars-decoder
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,6 @@ RUN set -x && \
popd && popd && \
# Clean up
apt-get remove -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -y && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/*
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
rm -rf /src/* && \
bash /scripts/clean-build.sh
15 changes: 9 additions & 6 deletions Dockerfile.base
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM debian:bookworm-20240513-slim
FROM debian:bookworm-20240612-slim

ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
S6OVERLAY_VERSION="v3.1.6.2" \
S6OVERLAY_VERSION="v3.2.0.0" \
# Fix for any issues with the S6 overlay. We have quite a few legacy services
# that worked fine under v2, but v3 is more strict and will kill a startup process
# if it takes more than 5 seconds. tar1090 and rtlsdrairband are the hardest hit
Expand All @@ -15,7 +15,9 @@ ENV S6_BEHAVIOUR_IF_STAGE2_FAILS=2 \
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# hadolint ignore=DL3008,SC2086,DL3003
RUN set -x && \
RUN \
--mount=type=bind,source=./,target=/app/ \
set -x && \
TEMP_PACKAGES=() && \
KEPT_PACKAGES=() && \
# packages needed to install
Expand Down Expand Up @@ -86,10 +88,11 @@ RUN set -x && \
curl -sSL https://raw.githubusercontent.com/sdr-enthusiasts/Buster-Docker-Fixes/main/install_libseccomp2.sh | bash && \
chmod +x /etc/s6-overlay/s6-rc.d/libseccomp2/up && \
chmod +x /etc/s6-overlay/scripts/libseccomp2_check.sh && \
curl -sSL https://raw.githubusercontent.com/sdr-enthusiasts/docker-baseimage/main/scripts/common -o /scripts/common && \
cp /app/scripts/* /scripts/ && \
# Clean up
apt-get remove -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -y && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/*
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
rm -rf /src/* && \
bash /scripts/clean-build.sh

ENTRYPOINT [ "/init" ]
5 changes: 3 additions & 2 deletions Dockerfile.dump978-full
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ RUN set -x && \
dump978-fa --json-stdout --stdin --format CS8 < /src/dump978-mutability/sample-data.txt && \
# Clean up
apt-get remove -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -y && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/*
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
rm -rf /src/* && \
bash /scripts/clean-build.sh
25 changes: 14 additions & 11 deletions Dockerfile.mlatclient
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,25 @@
# 1. Create a downloader image like this:
# FROM ghcr.io/sdr-enthusiasts/docker-baseimage:mlat-client as downloader
#
# 2. In your target image, make sure to add this to the APT install list:
# KEPT_PACKAGES+=(python3-setuptools) && \
# 2. In your target image, start your RUN command like this:
# RUN --mount=type=bind,from=downloader,source=/,target=/downloader set -x && \
#
# 3. Copy the following files into your target container:
# COPY --from=downloader /mlatclient.tgz /mlatclient.tgz
# 3. In your target image in that same RUN command, make sure to add this to the APT install list:
# KEPT_PACKAGES+=(python3-pkg-resources) && \
#
# 4. In a RUN directive for the target image, and after copying /mlatclient.tgz, do this:
# tar zxf /mlatclient.tgz -C / && rm -f /mlatclient.tgz && \
# 4. Also in the same RUN command for your target image, do this:
# tar zxf /downloader/mlatclient.tgz -C / && \
# ----------------------------------------------------------------------------------------
FROM debian:bookworm-20240513-slim
FROM debian:bookworm-20240612-slim

ENV MLATCLIENT_REPO="https://github.com/wiedehopf/mlat-client.git"

SHELL ["/bin/bash", "-o", "pipefail", "-c"]
SHELL ["/bin/bash", "-x", "-o", "pipefail", "-c"]

# hadolint ignore=DL3008,SC2086,DL3003
RUN set -x && \
RUN \
--mount=type=bind,source=./,target=/app/ \
set -x && \
PACKAGES=() && \
# packages needed to install
PACKAGES+=(git) && \
Expand Down Expand Up @@ -50,6 +52,7 @@ RUN set -x && \
#
# Clean up to keep the build image small:
apt-get remove -y "${PACKAGES[@]}" && \
apt-get autoremove -y && \
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
apt-get clean && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/* "${dist_pkg_target}" "${mlatclient_target}"
rm -rf /src/* "${dist_pkg_target}" "${mlatclient_target}" && \
bash /app/scripts/clean-build.sh
5 changes: 3 additions & 2 deletions Dockerfile.python
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ RUN set -x && \
&& \
# Clean up
apt-get remove -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -y && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/*
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
rm -rf /src/* && \
bash /scripts/clean-build.sh
5 changes: 3 additions & 2 deletions Dockerfile.qemu
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ RUN set -x && \
qemu-aarch64-static --version && \
# Clean up
apt-get remove -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -y && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/*
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
rm -rf /src/* && \
bash /scripts/clean-build.sh
5 changes: 3 additions & 2 deletions Dockerfile.readsb-full
Original file line number Diff line number Diff line change
Expand Up @@ -171,5 +171,6 @@ RUN set -x && \
curl -L -o "$BLADERF_RBF_PATH/adsbx115.rbf" https://www.nuand.com/fpga/adsbx115.rbf && \
# Clean up
apt-get remove -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -y && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/*
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
rm -rf /src/* && \
bash /scripts/clean-build.sh
5 changes: 3 additions & 2 deletions Dockerfile.readsb-netonly
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,6 @@ RUN set -x && \
cp -v /src/readsb-protobuf/readsb.proto /opt/readsb-protobuf/readsb.proto && \
# Clean up
apt-get remove -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -y && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/*
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
rm -rf /src/* && \
bash /scripts/clean-build.sh
5 changes: 3 additions & 2 deletions Dockerfile.rtlsdr
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ RUN set -x && \
popd && \
# Clean up
apt-get remove -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -y && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/*
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
rm -rf /src/* && \
bash /scripts/clean-build.sh
5 changes: 3 additions & 2 deletions Dockerfile.soapyrtlsdr
Original file line number Diff line number Diff line change
Expand Up @@ -69,5 +69,6 @@ RUN set -x && \
SoapySDRUtil --check=rtlsdr && \
# Clean up
apt-get remove -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -y && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/*
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
rm -rf /src/* && \
bash /scripts/clean-build.sh
5 changes: 3 additions & 2 deletions Dockerfile.wreadsb
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,6 @@ RUN set -x && \
viewadsb --version && \
# Clean up
apt-get remove -y "${TEMP_PACKAGES[@]}" && \
apt-get autoremove -y && \
rm -rf /src/* /tmp/* /var/lib/apt/lists/*
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
rm -rf /src/* && \
bash /scripts/clean-build.sh
2 changes: 2 additions & 0 deletions scripts/clean-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
rm -rf /tmp/* /var/lib/apt/lists/* /var/log/* /var/cache/debconf/templates.dat* /var/lib/dpkg/status-old