Skip to content

Commit

Permalink
Deploy new anfeeder (#80)
Browse files Browse the repository at this point in the history
* Create anfeeder.c

* Update Dockerfile

* Update 50-radarvirtuel

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* remove old ANfeeder binaries
  • Loading branch information
kx1t authored Sep 11, 2024
1 parent 9e9af6a commit 7726b7f
Show file tree
Hide file tree
Showing 6 changed files with 454 additions and 8 deletions.
8 changes: 7 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM ghcr.io/sdr-enthusiasts/docker-baseimage:mlatclient AS downloader
RUN --mount=type=bind,source=/source/,target=/source/ \
gcc -static /source/anfeeder.c -o /ANfeeder -lm -Ofast -W

FROM ghcr.io/sdr-enthusiasts/docker-baseimage:base

Expand Down Expand Up @@ -30,7 +32,11 @@ RUN --mount=type=bind,from=downloader,source=/,target=/downloader/ \
# Install mlatclient that was copied in from downloader image
tar zxf /downloader/mlatclient.tgz -C / && \
# test mlat-client
/usr/bin/mlat-client --help > /dev/null && \
/usr/local/bin/mlat-client --help > /dev/null || exit 1 && \
#
# Copy anfeeder:
mkdir -p /home/py/ && \
cp /downloader/ANfeeder /home/py/ANfeeder && \
# remove pycache introduced by testing mlat-client
find /usr | grep -E "/__pycache__$" | xargs rm -rf || true && \
# Add Container Version
Expand Down
16 changes: 9 additions & 7 deletions rootfs/etc/s6-overlay/scripts/50-radarvirtuel
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,15 @@ Verbose : ${VERBOSE}
EOF
fi

# Get the correct version of ANfeeder in place:
if [[ ! -f /home/py/ANfeeder-raspy-$(dpkg --print-architecture) ]]; then
"${s6wrap[@]}" echo "ERROR: target architecture not supported for $(dpkg --print-architecture) ! Container execution stopped."
exit 1
else
ln -sf "/home/py/ANfeeder-raspy-$(dpkg --print-architecture)" /home/py/ANfeeder
fi
# Following code is no longer necessary as ANfeeder is now built at container build time
# Get the correct version of ANfeeder in place
#if [[ ! -f /home/py/ANfeeder-raspy-$(dpkg --print-architecture) ]]; then
# "${s6wrap[@]}" echo "ERROR: target architecture not supported for $(dpkg --print-architecture) ! Container execution stopped."
# exit 1
#else
# ln -sf "/home/py/ANfeeder-raspy-$(dpkg --print-architecture)" /home/py/ANfeeder
#fi

if chk_enabled "${VERBOSE}"; then
"${s6wrap[@]}" echo "Sys Arch : $(dpkg --print-architecture) (supported)"
fi
Expand Down
Binary file removed rootfs/home/py/ANfeeder-raspy-amd64
Binary file not shown.
Binary file removed rootfs/home/py/ANfeeder-raspy-arm64
Binary file not shown.
Binary file removed rootfs/home/py/ANfeeder-raspy-armhf
Binary file not shown.
Loading

0 comments on commit 7726b7f

Please sign in to comment.