From 45a1af39f62be6b118a579a3d5eaa32cf6eb72f3 Mon Sep 17 00:00:00 2001 From: Christoph Honal Date: Wed, 12 Feb 2020 14:13:10 +0100 Subject: [PATCH] docker scripts --- Dockerfile | 1 + scripts/build.sh | 2 +- scripts/buildx.sh | 9 --------- scripts/push.sh | 8 ++++++++ scripts/run.sh | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) delete mode 100644 scripts/buildx.sh create mode 100644 scripts/push.sh diff --git a/Dockerfile b/Dockerfile index 9fbb137..29ae83b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,6 +28,7 @@ RUN git clone https://github.com/MOVE-II/move2radio.git && \ cd move2radio-prop/ldpc && git checkout 940e8f96ccae831c7d3ad6b9497710696cd7f324 && git reset --hard && cd ../.. && \ git clone git@${PROP_SERVER}:${PROP_DIR_SDR}/gr-ccsds.git move2radio-prop/gr-ccsds && \ cd move2radio-prop/gr-ccsds && git checkout 5777e4176fe381327fe6cf55b7ec0dfe3c63b3f6 && git reset --hard && cd ../.. +RUN git clone git@${PROP_SERVER}:${PROP_DIR_SDR}/com_utilities.git move2radio-prop/com_utilities # Build stage FROM ubuntu:18.04 diff --git a/scripts/build.sh b/scripts/build.sh index 8d92868..dc05075 100644 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -6,4 +6,4 @@ export PROP_SERVER_KEY=$(cat ./config/id_rsa) docker build \ --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-dev . \ No newline at end of file + --build-arg PROP_DIR_SDR --build-arg PROP_DIR_DECODER -t registry.chrz.de:443/move2docker:latest-$(arch) . \ No newline at end of file diff --git a/scripts/buildx.sh b/scripts/buildx.sh deleted file mode 100644 index a9101f9..0000000 --- a/scripts/buildx.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -cd "${0%/*}/.." -source ./config/config.sh -export PROP_SERVER_KEY=$(cat ./config/id_rsa) - -docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 \ - --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:latest . \ No newline at end of file diff --git a/scripts/push.sh b/scripts/push.sh new file mode 100644 index 0000000..099a806 --- /dev/null +++ b/scripts/push.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +docker push registry.chrz.de:443/move2docker:latest-$(arch) + +docker manifest create registry.chrz.de:443/move2docker:latest registry.chrz.de:443/move2docker:latest-x86_64 registry.chrz.de:443/move2docker:latest-armv7l +docker manifest annotate registry.chrz.de:443/move2docker:latest registry.chrz.de:443/move2docker:latest-x86_64 --os linux --arch amd64 +docker manifest annotate registry.chrz.de:443/move2docker:latest registry.chrz.de:443/move2docker:latest-armv7l --os linux --arch armv7 +docker manifest push registry.chrz.de:443/move2docker:latest --purge \ No newline at end of file diff --git a/scripts/run.sh b/scripts/run.sh index fc3e3c7..b4237b9 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -1,3 +1,3 @@ #!/bin/bash -docker run -it --rm -v ./data:/app/data:rw --env DISPLAY=host.docker.internal:0.0 move2docker-dev \ No newline at end of file +docker run -it --rm -v ./data:/app/data:rw --env DISPLAY=host.docker.internal:0.0 registry.chrz.de:443/move2docker:latest \ No newline at end of file