This repository has been archived by the owner on Aug 24, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
66 lines (61 loc) · 2.36 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM ghcr.io/sdr-enthusiasts/docker-baseimage:wreadsb
LABEL org.opencontainers.image.source = "https://github.com/sdr-enthusiasts/docker-multifeeder"
ENV URL_MLAT_CLIENT_REPO="https://github.com/adsbxchange/mlat-client.git" \
PRIVATE_MLAT="false" \
MLAT_INPUT_TYPE="auto"
RUN set -x && \
# define packages needed for installation and general management of the container:
TEMP_PACKAGES=() && \
KEPT_PACKAGES=() && \
KEPT_PACKAGES+=(procps nano aptitude) && \
KEPT_PACKAGES+=(psmisc) && \
# Git and net-tools are needed to install and run @Mikenye's HealthCheck framework
KEPT_PACKAGES+=(git) && \
#
# Needed to run the mlat_client:
KEPT_PACKAGES+=(python3) && \
KEPT_PACKAGES+=(python3-pip) && \
KEPT_PACKAGES+=(python3-setuptools) && \
KEPT_PACKAGES+=(python3-wheel) && \
#
# These are needed to compile and install the mlat_client:
TEMP_PACKAGES+=(build-essential) && \
TEMP_PACKAGES+=(debhelper) && \
TEMP_PACKAGES+=(python3-dev) && \
TEMP_PACKAGES+=(python3-distutils-extra) && \
#
# Install all these packages:
apt-get update -q -y && \
apt-get install -o Dpkg::Options::="--force-confnew" --force-yes -y --no-install-recommends -q \
${KEPT_PACKAGES[@]} \
${TEMP_PACKAGES[@]} && \
#
# Compile and Install the mlat_client
mkdir -p /git && \
pushd /git && \
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 && \
popd && \
rm -rf /git && \
#
# Clean up
apt-get remove -q -y ${TEMP_PACKAGES[@]} && \
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 && \
#
# Do some stuff for kx1t's convenience:
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 && \
git clone --depth=1 -b $branch https://github.com/sdr-enthusiasts/docker-multifeeder.git /tmp/clone && \
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/*