This repository has been archived by the owner on Jul 3, 2024. It is now read-only.
forked from Thom-x/docker-fr24feed-piaware-dump1090
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8f7f151
commit a0f4437
Showing
18 changed files
with
44 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,7 @@ RUN git clone -b ${DUMP1090_VERSION} --depth 1 https://github.com/flightaware/du | |
## TEMPORARY DOCKER IMAGE TO BUILD TCL-TLS | ||
## | ||
################################################################## | ||
FROM multiarch/debian-debootstrap:armhf-buster as tcltls | ||
FROM multiarch/debian-debootstrap:armhf-buster-slim as tcltls | ||
|
||
ENV DEBIAN_VERSION buster | ||
|
||
|
@@ -63,7 +63,7 @@ RUN ./prepare-build.sh ${DEBIAN_VERSION} && \ | |
## TEMPORARY DOCKER IMAGE TO BUILD PIAWARE | ||
## | ||
################################################################## | ||
FROM multiarch/debian-debootstrap:armhf-buster as piaware | ||
FROM multiarch/debian-debootstrap:armhf-buster-slim as piaware | ||
|
||
ENV DEBIAN_VERSION buster | ||
ENV PIAWARE_VERSION v3.8.1 | ||
|
@@ -111,7 +111,7 @@ RUN dpkg -i tcl-tls_*.deb && \ | |
## TEMPORARY DOCKER IMAGE TO BUILD CONFD | ||
## | ||
################################################################## | ||
FROM multiarch/debian-debootstrap:armhf-buster as confd | ||
FROM multiarch/debian-debootstrap:armhf-buster-slim as confd | ||
|
||
ENV CONFD_VERSION v0.16.0 | ||
|
||
|
@@ -141,7 +141,7 @@ RUN git clone -b ${CONFD_VERSION} --depth 1 https://github.com/kelseyhightower/c | |
## FINAL DOCKER IMAGE TO BE USED | ||
## | ||
################################################################## | ||
FROM multiarch/debian-debootstrap:armhf-buster-slim as serve | ||
FROM multiarch/debian-debootstrap:armhf-buster-slim as flightfeedr | ||
|
||
ENV DEBIAN_VERSION buster | ||
ENV RTL_SDR_VERSION 0.6.0 | ||
|
@@ -151,6 +151,8 @@ ENV S6_OVERLAY_VERSION v1.22.1.0 | |
|
||
LABEL maintainer="[email protected]" | ||
|
||
WORKDIR /tmp | ||
|
||
RUN apt-get update -y && \ | ||
apt-get install -y \ | ||
nano \ | ||
|
@@ -184,7 +186,6 @@ RUN apt-get update -y && \ | |
rm -rf /var/lib/apt/lists/* | ||
|
||
# RTL-SDR | ||
WORKDIR /tmp | ||
RUN mkdir -p /etc/modprobe.d && \ | ||
echo 'blacklist r820t' >> /etc/modprobe.d/raspi-blacklist.conf && \ | ||
echo 'blacklist rtl2832' >> /etc/modprobe.d/raspi-blacklist.conf && \ | ||
|
@@ -200,55 +201,49 @@ RUN mkdir -p /etc/modprobe.d && \ | |
rm -rf /tmp/rtl-sdr | ||
|
||
# DUMP1090 | ||
WORKDIR /tmp | ||
RUN mkdir -p /usr/lib/fr24/public_html/data | ||
COPY --from=dump1090 /tmp/dump1090/dump1090 /usr/lib/fr24/ | ||
COPY --from=dump1090 /tmp/dump1090/public_html /usr/lib/fr24/public_html | ||
RUN rm /usr/lib/fr24/public_html/config.js | ||
|
||
# PIAWARE | ||
WORKDIR /tmp | ||
COPY --from=tcltls /tmp/tcltls-rebuild /tmp | ||
COPY --from=piaware /tmp/piaware_builder /tmp | ||
RUN dpkg -i tcl-tls_*.deb && \ | ||
dpkg -i piaware_*_*.deb && \ | ||
rm /etc/piaware.conf | ||
|
||
# CONFD | ||
COPY --from=confd /tmp/confd/bin/confd /opt/confd/bin/confd | ||
|
||
# FR24FEED | ||
WORKDIR /opt/fr24feed/bin | ||
ADD https://repo-feed.flightradar24.com/rpi_binaries/fr24feed_${FR24FEED_VERSION}_armhf.tgz /opt/fr24feed/bin | ||
RUN tar -xzf fr24feed_*_armhf.tgz && \ | ||
mv fr24feed_armhf/* . && \ | ||
rm -r fr24feed_armhf/ && \ | ||
rm fr24feed_*_armhf.tgz | ||
RUN wget -U "Debian APT-HTTP/1.3" https://repo-feed.flightradar24.com/rpi_binaries/fr24feed_${FR24FEED_VERSION}_armhf.tgz && \ | ||
tar -xzf fr24feed_*_armhf.tgz && \ | ||
mkdir -p /opt/fr24feed/bin | ||
mv fr24feed_armhf/fr24feed /opt/fr24feed/bin | ||
|
||
# RBFEEDER | ||
WORKDIR /tmp | ||
RUN wget -U "Debian APT-HTTP/1.3" https://apt.rb24.com/pool/main/r/rbfeeder/rbfeeder_${RBFEEDER_VERSION}_armhf.deb && \ | ||
ar x rbfeeder_*_armhf.deb && \ | ||
rm rbfeeder_*_armhf.deb && \ | ||
rm control.tar* && \ | ||
rm debian-binary && \ | ||
tar -xf data.tar* && \ | ||
rm data.tar* && \ | ||
rm -r lib/ && \ | ||
rm -r etc/ && \ | ||
mkdir -p /opt/rbfeeder/bin && \ | ||
cp usr/bin/* /opt/rbfeeder/bin && \ | ||
rm -r usr/ | ||
mv usr/bin/* /opt/rbfeeder/bin | ||
|
||
# OPENSKYD | ||
RUN wget https://opensky-network.org/files/firmware/opensky-feeder_${OPENSKYD_VERSION}_armhf.deb && \ | ||
ar x openskyd.deb && \ | ||
tar -xf data.tar* && \ | ||
mkdir -p /opt/openskyd/bin && \ | ||
mv usr/bin/openskyd-dump1090 /opt/openskyd/bin/openskyd | ||
|
||
# CONFD | ||
COPY --from=confd /tmp/confd/bin/confd /opt/confd/bin/confd | ||
|
||
# S6 OVERLAY | ||
ADD https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-armhf.tar.gz /tmp/ | ||
RUN tar xzf /tmp/s6-overlay-armhf.tar.gz -C / && \ | ||
rm /tmp/s6-overlay-armhf.tar.gz | ||
RUN wget https://github.com/just-containers/s6-overlay/releases/download/${S6_OVERLAY_VERSION}/s6-overlay-armhf.tar.gz && \ | ||
tar xzf s6-overlay-armhf.tar.gz -C / && \ | ||
COPY /root / | ||
|
||
# CLEANUP | ||
RUN rm -r /tmp/* | ||
|
||
EXPOSE 8754 8080 30001 30002 30003 30004 30005 30104 | ||
EXPOSE 8754 8080 | ||
|
||
ENTRYPOINT ["/init"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,4 @@ | ||
# This file configures piaware and related software. | ||
# You can edit it directly or use piaware-config from the command line | ||
# to view and change settings. | ||
# | ||
# If /boot/piaware-config.txt also exists, then settings present in | ||
# that file will override settings in this file. | ||
{{- range gets "/*" }} | ||
{{base .Key }} {{ .Value }} | ||
{{- end }} | ||
{{- range gets "/*/dash/*" }} | ||
{{base (dir (dir .Key))}}-{{base .Key }} {{ .Value }} | ||
{{- end }} | ||
{{- range gets "/*/dash/*/dash/*" }} | ||
{{base (dir (dir (dir (dir .Key))))}}-{{base (dir (dir .Key))}}-{{base .Key }} {{ .Value }} | ||
{{- end }} | ||
{{- range gets "/*/dash/*/dash/*/dash/*" }} | ||
{{base (dir (dir (dir (dir (dir (dir .Key))))))}}-{{base (dir (dir (dir (dir .Key))))}}-{{base (dir (dir .Key))}}-{{base .Key }} {{ .Value }} | ||
{{- end }} | ||
feeder-id {{getv "/key"}} | ||
receiver-host 127.0.0.1 | ||
receiver-port 30005 | ||
receiver-type other |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
default_value() | ||
{ | ||
key=${1//\-/_DASH_} | ||
key=FR24FEED_${key^^} | ||
eval "value=\${$key:-\$2}" | ||
printf -v $key -- "$value" | ||
export $key | ||
} | ||
|
||
default_value "fr24key" "YOUR_KEY_HERE" | ||
|
||
if [ ! -f /etc/fr24feed.ini ]; then | ||
/opt/confd/bin/confd -onetime -confdir "/etc/confd/fr24feed" -prefix "fr24feed" -backend env | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
default_value() | ||
{ | ||
key=${1//\-/_DASH_} | ||
key=PIAWARE_${key^^} | ||
eval "value=\${$key:-\$2}" | ||
printf -v $key -- "$value" | ||
export $key | ||
} | ||
|
||
default_value "feeder-id" "YOUR_FEEDER_ID" | ||
|
||
if [ ! -f /etc/piaware.conf ]; then | ||
/opt/confd/bin/confd -onetime -confdir "/etc/confd/piaware" -prefix "piaware" -backend env | ||
fi |
11 changes: 0 additions & 11 deletions
11
root/etc/cont-init.d/05-confd-rbfeeder → root/etc/cont-init.d/03-confd-rbfeeder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,5 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
default_value() | ||
{ | ||
key=${1//\-/_DASH_} | ||
key=RBFEEDER_${key^^} | ||
eval "value=\${$key:-\$2}" | ||
printf -v $key -- "$value" | ||
export $key | ||
} | ||
|
||
default_value "key" "" | ||
|
||
if [ ! -f /etc/rbfeeder.ini ]; then | ||
/opt/confd/bin/confd -onetime -confdir "/etc/confd/rbfeeder" -prefix "rbfeeder" -backend env | ||
fi |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/usr/bin/execlineb -S0 | ||
s6-svscanctl -t /var/run/s6/services | ||
|
||
#s6-svscanctl -t /var/run/s6/services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,20 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
if [ "$SERVICE_ENABLE_DUMP1090" != "false" ] | ||
then | ||
default_value() | ||
{ | ||
key=${1//\-/_DASH_} | ||
key=HTML_${key^^} | ||
key=SITE_${key^^} | ||
eval "value=\${$key:-\$2}" | ||
printf -v $key -- "$value" | ||
export $key | ||
} | ||
|
||
default_value "site_lat" "45.0" | ||
default_value "site_lon" "9.0" | ||
default_value "lat" "45.0" | ||
default_value "lon" "9.0" | ||
|
||
/usr/lib/fr24/dump1090 --net --mlat --write-json /usr/lib/fr24/public_html/data --raw --quiet --lat ${HTML_SITE_LAT} --lon ${HTML_SITE_LON} --gain -10 | ||
/opt/dump1090/bin/dump1090 --net --mlat --write-json /usr/lib/fr24/public_html/data --raw --quiet --lat ${SITE_LAT} --lon ${SITE_LON} --gain -10 | ||
else | ||
tail -f /dev/null | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/usr/bin/execlineb -S0 | ||
s6-svscanctl -t /var/run/s6/services | ||
|
||
#s6-svscanctl -t /var/run/s6/services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
if [ "$SERVICE_ENABLE_FR24FEED" != "false" ] | ||
then | ||
/opt/fr24feed/bin/fr24feed | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/usr/bin/execlineb -S0 | ||
|
||
s6-svscanctl -t /var/run/s6/services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
if [ "$SERVICE_ENABLE_HTTP" != "false" ] | ||
then | ||
cd /usr/lib/fr24/public_html | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/usr/bin/execlineb -S0 | ||
s6-svscanctl -t /var/run/s6/services | ||
|
||
#s6-svscanctl -t /var/run/s6/services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
if [ "$SERVICE_ENABLE_PIAWARE" != "false" ] | ||
then | ||
/usr/bin/piaware -plainlog | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
#!/usr/bin/execlineb -S0 | ||
s6-svscanctl -t /var/run/s6/services | ||
|
||
#s6-svscanctl -t /var/run/s6/services |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
#!/usr/bin/with-contenv bash | ||
|
||
if [ "$SERVICE_ENABLE_RBFEEDER" != "false" ] | ||
then | ||
/opt/rbfeeder/bin/rbfeeder | ||
|