From 0b98ce1ef29b0e3a413fa8fb3e438096936cc3d6 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Sun, 24 Nov 2019 15:30:53 +0100 Subject: [PATCH] restructure docker image; add separate temp dir that can be placed in a tmpfs --- docker/Dockerfiles/Dockerfile-base | 13 ++++++++++--- docker/scripts/install-dependencies.sh | 4 ---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/docker/Dockerfiles/Dockerfile-base b/docker/Dockerfiles/Dockerfile-base index 4dbca2f..c26c5ee 100644 --- a/docker/Dockerfiles/Dockerfile-base +++ b/docker/Dockerfiles/Dockerfile-base @@ -3,15 +3,22 @@ FROM $BASE_IMAGE RUN apk add --no-cache bash +RUN ln -s /usr/local/lib /usr/local/lib64 + ADD docker/scripts/direwolf-1.5.patch / ADD docker/scripts/install-dependencies.sh / RUN /install-dependencies.sh -ADD . /openwebrx +ADD . /opt/openwebrx -WORKDIR /openwebrx +WORKDIR /opt/openwebrx + +RUN mkdir -p /tmp/openwebrx && \ + mv "/opt/openwebrx/config_webrx.py" "/opt/openwebrx/config_webrx.py.orig" && \ + sed 's/temporary_directory = "\/tmp"/temporary_directory = "\/tmp\/openwebrx"/' < "/opt/openwebrx/config_webrx.py.orig" > "/opt/openwebrx/config_webrx.py" && \ + rm "/opt/openwebrx/config_webrx.py.orig" VOLUME /config -ENTRYPOINT [ "/openwebrx/docker/scripts/run.sh" ] +ENTRYPOINT [ "/opt/openwebrx/docker/scripts/run.sh" ] EXPOSE 8073 diff --git a/docker/scripts/install-dependencies.sh b/docker/scripts/install-dependencies.sh index db4f17f..aef2d72 100755 --- a/docker/scripts/install-dependencies.sh +++ b/docker/scripts/install-dependencies.sh @@ -32,10 +32,6 @@ rm -rf csdr git clone https://github.com/szechyjs/mbelib.git cmakebuild mbelib -if [ -d "/usr/local/lib64" ]; then - # no idea why it's put into there now. alpine does not handle it correctly, so move it. - mv /usr/local/lib64/libmbe* /usr/local/lib -fi git clone https://github.com/jketterl/digiham.git cmakebuild digiham