2023-03-22 16:15:26 +00:00
|
|
|
FROM ghcr.io/sdr-enthusiasts/docker-tar1090:latest
|
2023-03-21 19:56:02 +00:00
|
|
|
|
2023-03-23 17:29:49 +00:00
|
|
|
LABEL org.opencontainers.image.source = "https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder"
|
2023-03-21 19:56:02 +00:00
|
|
|
|
2023-03-27 17:21:53 +00:00
|
|
|
ENV URL_MLAT_CLIENT_REPO="https://github.com/wiedehopf/mlat-client.git" \
|
2023-03-21 19:56:02 +00:00
|
|
|
PRIVATE_MLAT="false" \
|
|
|
|
MLAT_INPUT_TYPE="auto"
|
|
|
|
|
|
|
|
RUN set -x && \
|
|
|
|
TEMP_PACKAGES=() && \
|
|
|
|
KEPT_PACKAGES=() && \
|
2023-07-29 20:58:16 +00:00
|
|
|
# Git and net-tools are needed to install and run @Mikenye's HealthCheck framework
|
2023-03-21 19:56:02 +00:00
|
|
|
KEPT_PACKAGES+=(git) && \
|
2023-07-29 20:58:16 +00:00
|
|
|
#
|
|
|
|
# Needed to run the mlat_client:
|
2023-08-26 23:25:51 +00:00
|
|
|
# POST_PACKAGES+=(python3-minimal) && \
|
2023-07-29 20:58:16 +00:00
|
|
|
#
|
|
|
|
# These are needed to compile and install the mlat_client:
|
2023-08-26 23:25:51 +00:00
|
|
|
KEPT_PACKAGES+=(python3) && \
|
2024-05-26 16:43:00 +00:00
|
|
|
KEPT_PACKAGES+=(python3-pkg-resources) && \
|
2023-03-21 19:56:02 +00:00
|
|
|
TEMP_PACKAGES+=(build-essential) && \
|
|
|
|
TEMP_PACKAGES+=(debhelper) && \
|
2024-05-26 16:43:00 +00:00
|
|
|
TEMP_PACKAGES+=(python3-dev) && \
|
|
|
|
TEMP_PACKAGES+=(python3-distutils-extra) && \
|
|
|
|
TEMP_PACKAGES+=(python3-pip) && \
|
|
|
|
TEMP_PACKAGES+=(python3-setuptools) && \
|
|
|
|
TEMP_PACKAGES+=(python3-wheel) && \
|
2023-07-29 20:58:16 +00:00
|
|
|
#
|
|
|
|
# packages needed for debugging - these can stay out in production builds:
|
2023-04-28 14:04:43 +00:00
|
|
|
#KEPT_PACKAGES+=(procps nano aptitude psmisc) && \
|
2023-07-29 20:58:16 +00:00
|
|
|
# Install all these packages:
|
2023-03-21 19:56:02 +00:00
|
|
|
apt-get update -q -y && \
|
2023-04-28 14:04:43 +00:00
|
|
|
apt-get install -o Dpkg::Options::="--force-confnew" -y --no-install-recommends -q \
|
2023-07-29 20:58:16 +00:00
|
|
|
${KEPT_PACKAGES[@]} \
|
|
|
|
${TEMP_PACKAGES[@]} && \
|
|
|
|
#
|
|
|
|
# Compile and Install the mlat_client
|
2023-03-21 19:56:02 +00:00
|
|
|
mkdir -p /git && \
|
|
|
|
pushd /git && \
|
2023-07-29 20:58:16 +00:00
|
|
|
git clone --depth 1 $URL_MLAT_CLIENT_REPO && \
|
|
|
|
cd mlat-client && \
|
|
|
|
./setup.py install && \
|
|
|
|
ln -s /usr/local/bin/mlat-client /usr/bin/mlat-client && \
|
2023-03-21 19:56:02 +00:00
|
|
|
popd && \
|
|
|
|
rm -rf /git && \
|
2023-07-29 20:58:16 +00:00
|
|
|
#
|
|
|
|
# Clean up and install POST_PACKAGES:
|
2023-03-21 19:56:02 +00:00
|
|
|
apt-get remove -q -y ${TEMP_PACKAGES[@]} && \
|
2023-08-26 23:25:51 +00:00
|
|
|
# apt-get install -o Dpkg::Options::="--force-confnew" -y --no-install-recommends -q \
|
|
|
|
# ${POST_PACKAGES[@]} && \
|
2023-03-21 19:56:02 +00:00
|
|
|
apt-get autoremove -q -o APT::Autoremove::RecommendsImportant=0 -o APT::Autoremove::SuggestsImportant=0 -y && \
|
|
|
|
apt-get clean -q -y && \
|
|
|
|
rm -rf /src /tmp/* /var/lib/apt/lists/* /git && \
|
2023-07-29 20:58:16 +00:00
|
|
|
#
|
|
|
|
# Do some stuff for kx1t's convenience:
|
2023-03-21 19:56:02 +00:00
|
|
|
echo "alias dir=\"ls -alsv\"" >> /root/.bashrc && \
|
|
|
|
echo "alias nano=\"nano -l\"" >> /root/.bashrc
|
|
|
|
|
|
|
|
COPY rootfs/ /
|
|
|
|
|
|
|
|
# Add Container Version
|
|
|
|
RUN set -x && \
|
|
|
|
branch="##BRANCH##" && \
|
|
|
|
[[ "${branch:0:1}" == "#" ]] && branch="main" || true && \
|
2023-03-28 20:06:11 +00:00
|
|
|
git clone --depth=1 -b $branch https://github.com/sdr-enthusiasts/docker-adsb-ultrafeeder.git /tmp/clone && \
|
2023-03-21 19:56:02 +00:00
|
|
|
pushd /tmp/clone && \
|
|
|
|
echo "$(TZ=UTC date +%Y%m%d-%H%M%S)_$(git rev-parse --short HEAD)_$(git branch --show-current)" > /.CONTAINER_VERSION && \
|
|
|
|
popd && \
|
|
|
|
rm -rf /tmp/*
|