From 6c307d885ff9ca44b4f91eccfe71ac55d926c928 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sun, 24 May 2020 16:00:36 +0200 Subject: [PATCH] integrate s6 service layer for sdrplay --- docker/Dockerfiles/Dockerfile-base | 9 +++++++-- docker/Dockerfiles/Dockerfile-full | 4 +++- docker/Dockerfiles/Dockerfile-sdrplay | 4 +++- docker/{scripts => files/js8call}/js8call-hamlib.patch | 0 .../{scripts => files/sdrplay}/install-lib.aarch64.patch | 0 .../{scripts => files/sdrplay}/install-lib.armv7l.patch | 0 .../{scripts => files/sdrplay}/install-lib.x86_64.patch | 0 docker/files/services/openwebrx/run | 2 ++ docker/files/services/sdrplay/run | 2 ++ 9 files changed, 17 insertions(+), 4 deletions(-) rename docker/{scripts => files/js8call}/js8call-hamlib.patch (100%) rename docker/{scripts => files/sdrplay}/install-lib.aarch64.patch (100%) rename docker/{scripts => files/sdrplay}/install-lib.armv7l.patch (100%) rename docker/{scripts => files/sdrplay}/install-lib.x86_64.patch (100%) create mode 100755 docker/files/services/openwebrx/run create mode 100755 docker/files/services/sdrplay/run diff --git a/docker/Dockerfiles/Dockerfile-base b/docker/Dockerfiles/Dockerfile-base index 2ac1cd4..3797cc7 100644 --- a/docker/Dockerfiles/Dockerfile-base +++ b/docker/Dockerfiles/Dockerfile-base @@ -1,6 +1,10 @@ FROM debian:buster-slim -ADD docker/scripts/js8call-hamlib.patch / +ADD https://github.com/just-containers/s6-overlay/releases/download/v1.21.8.0/s6-overlay-amd64.tar.gz /tmp/ +RUN tar xzf /tmp/s6-overlay-amd64.tar.gz -C / +ENTRYPOINT ["/init"] + +ADD docker/files/js8call/js8call-hamlib.patch / ADD docker/scripts/install-dependencies.sh / RUN /install-dependencies.sh && \ rm /install-dependencies.sh @@ -9,5 +13,6 @@ WORKDIR /opt/openwebrx VOLUME /etc/openwebrx -ENTRYPOINT [ "/opt/openwebrx/docker/scripts/run.sh" ] +ADD docker/files/services/openwebrx /etc/services.d/openwebrx + EXPOSE 8073 diff --git a/docker/Dockerfiles/Dockerfile-full b/docker/Dockerfiles/Dockerfile-full index 9571428..fbb3bd7 100644 --- a/docker/Dockerfiles/Dockerfile-full +++ b/docker/Dockerfiles/Dockerfile-full @@ -2,7 +2,7 @@ ARG ARCHTAG FROM openwebrx-base:$ARCHTAG ADD docker/scripts/install-dependencies-*.sh / -ADD docker/scripts/install-lib.*.patch / +ADD docker/files/sdrplay/install-lib.*.patch / RUN /install-dependencies-rtlsdr.sh &&\ /install-dependencies-hackrf.sh &&\ @@ -21,4 +21,6 @@ ADD docker/scripts/install-connectors.sh / RUN /install-connectors.sh &&\ rm /install-connectors.sh +ADD docker/files/services/sdrplay /etc/services.d/sdrplay + ADD . /opt/openwebrx diff --git a/docker/Dockerfiles/Dockerfile-sdrplay b/docker/Dockerfiles/Dockerfile-sdrplay index eb4cf2c..ec649f2 100644 --- a/docker/Dockerfiles/Dockerfile-sdrplay +++ b/docker/Dockerfiles/Dockerfile-sdrplay @@ -2,9 +2,11 @@ ARG ARCHTAG FROM openwebrx-soapysdr-base:$ARCHTAG ADD docker/scripts/install-dependencies-sdrplay.sh / -ADD docker/scripts/install-lib.*.patch / +ADD docker/files/sdrplay/install-lib.*.patch / RUN /install-dependencies-sdrplay.sh &&\ rm /install-dependencies-sdrplay.sh &&\ rm /install-lib.*.patch +ADD docker/files/services/sdrplay /etc/services.d/sdrplay + ADD . /opt/openwebrx diff --git a/docker/scripts/js8call-hamlib.patch b/docker/files/js8call/js8call-hamlib.patch similarity index 100% rename from docker/scripts/js8call-hamlib.patch rename to docker/files/js8call/js8call-hamlib.patch diff --git a/docker/scripts/install-lib.aarch64.patch b/docker/files/sdrplay/install-lib.aarch64.patch similarity index 100% rename from docker/scripts/install-lib.aarch64.patch rename to docker/files/sdrplay/install-lib.aarch64.patch diff --git a/docker/scripts/install-lib.armv7l.patch b/docker/files/sdrplay/install-lib.armv7l.patch similarity index 100% rename from docker/scripts/install-lib.armv7l.patch rename to docker/files/sdrplay/install-lib.armv7l.patch diff --git a/docker/scripts/install-lib.x86_64.patch b/docker/files/sdrplay/install-lib.x86_64.patch similarity index 100% rename from docker/scripts/install-lib.x86_64.patch rename to docker/files/sdrplay/install-lib.x86_64.patch diff --git a/docker/files/services/openwebrx/run b/docker/files/services/openwebrx/run new file mode 100755 index 0000000..2c2b7fd --- /dev/null +++ b/docker/files/services/openwebrx/run @@ -0,0 +1,2 @@ +#!/usr/bin/execlineb -P +/opt/openwebrx/docker/scripts/run.sh \ No newline at end of file diff --git a/docker/files/services/sdrplay/run b/docker/files/services/sdrplay/run new file mode 100755 index 0000000..0f31c4c --- /dev/null +++ b/docker/files/services/sdrplay/run @@ -0,0 +1,2 @@ +#!/usr/bin/execlineb -P +/usr/local/bin/sdrplay_apiService \ No newline at end of file