From 210019e2f9e6c80f48d0e047f053830560067e95 Mon Sep 17 00:00:00 2001 From: Christoph Honal Date: Wed, 12 Feb 2020 18:19:25 +0100 Subject: [PATCH] more fixes --- Dockerfile | 3 ++- README.md | 5 ++++- build/run-cli.sh | 7 +++++++ build/{run.sh => run-gui.sh} | 0 scripts/build.sh | 7 ++++--- scripts/buildx.sh | 8 +++++--- scripts/run.sh | 5 ++++- 7 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 build/run-cli.sh rename build/{run.sh => run-gui.sh} (100%) diff --git a/Dockerfile b/Dockerfile index 8503d3d..fa242c8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -82,7 +82,8 @@ ENV PATH="/app/move2radio/build/prefix/usr/bin:${PATH}" \ # Install binaries COPY build/blocks/* app/move2radio/build/prefix/usr/share/gnuradio/grc/blocks/ COPY build/fakeserver/* /app/fakeserver/ -COPY build/run.sh /app/run.sh +ARG UI_MODE=cli +COPY build/run-${UI_MODE}.sh /app/run.sh RUN chmod 644 app/move2radio/build/prefix/usr/share/gnuradio/grc/blocks/*.xml && \ chmod +x /app/run.sh && ldconfig diff --git a/README.md b/README.md index e10431e..4182011 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,5 @@ -# move2docker +# Move2Docker MOVE-II decoder docker container + +## Usage +Use the scripts from the `scripts` directory to control the docker containers. \ No newline at end of file diff --git a/build/run-cli.sh b/build/run-cli.sh new file mode 100644 index 0000000..af28ad4 --- /dev/null +++ b/build/run-cli.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +mkdir -p /app/data/output +touch /app/data/output/frames.txt +python3 /app/fakeserver/server.py & + +bash \ No newline at end of file diff --git a/build/run.sh b/build/run-gui.sh similarity index 100% rename from build/run.sh rename to build/run-gui.sh diff --git a/scripts/build.sh b/scripts/build.sh index db164b4..ed6d7d5 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -5,6 +5,7 @@ source ./config/config.sh export PROP_SERVER_KEY=$(cat ./config/id_rsa) export UI_MODE=$1 -docker build --build-arg UI_MODE \ - --build-arg PROP_SERVER --build-arg PROP_SERVER_USER --build-arg PROP_SERVER_KEY \ - --build-arg PROP_DIR_SDR --build-arg PROP_DIR_DECODER -t registry.chrz.de:443/move2docker:$UI_MODE-$(arch) . \ No newline at end of file +docker build \ + --build-arg UI_MODE --build-arg PROP_SERVER --build-arg PROP_SERVER_USER \ + --build-arg PROP_SERVER_KEY --build-arg PROP_DIR_SDR --build-arg PROP_DIR_DECODER \ + -t registry.chrz.de:443/move2docker:$UI_MODE-$(arch) . \ No newline at end of file diff --git a/scripts/buildx.sh b/scripts/buildx.sh index 65b7831..a43f8c3 100644 --- a/scripts/buildx.sh +++ b/scripts/buildx.sh @@ -5,6 +5,8 @@ source ./config/config.sh export PROP_SERVER_KEY=$(cat ./config/id_rsa) export UI_MODE=$1 -docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --build-arg UI_MODE \ - --build-arg PROP_SERVER --build-arg PROP_SERVER_USER --build-arg PROP_SERVER_KEY \ - --build-arg PROP_DIR_SDR --build-arg PROP_DIR_DECODER -t move2docker:$UI_MODE-latest . \ No newline at end of file +docker buildx build \ + --platform linux/amd64,linux/arm64,linux/arm/v7 \ + --build-arg UI_MODE --build-arg PROP_SERVER --build-arg PROP_SERVER_USER \ + --build-arg PROP_SERVER_KEY --build-arg PROP_DIR_SDR --build-arg PROP_DIR_DECODER \ + -t move2docker:$UI_MODE-latest . \ No newline at end of file diff --git a/scripts/run.sh b/scripts/run.sh index 6ba713d..396d994 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -4,4 +4,7 @@ cd "${0%/*}/.." source ./config/config.sh export UI_MODE=$1 -docker run -it --rm -v ./data:/app/data:rw --env DISPLAY=host.docker.internal:0.0 registry.chrz.de:443/move2docker:$UI_MODE-latest-$(arch) \ No newline at end of file +docker run -it --rm \ + -v $(pwd)/data:/app/data:rw \ + --env DISPLAY=host.docker.internal:0.0 \ + registry.chrz.de:443/move2docker:$UI_MODE-$(arch) \ No newline at end of file