Merge branch 'master' of https://git.chrz.de/chonal/move2docker
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Christoph Honal 2020-02-18 23:41:49 +01:00
commit 5ed8bb398b
8 changed files with 27 additions and 20 deletions

View File

@ -22,6 +22,8 @@ steps:
- docker buildx build --platform linux/amd64,linux/arm/v7 --output=type=image,push=true --progress tty - docker buildx build --platform linux/amd64,linux/arm/v7 --output=type=image,push=true --progress tty
--build-arg PROP_SERVER --build-arg PROP_SERVER_USER --build-arg PROP_SERVER --build-arg PROP_SERVER_USER
--build-arg PROP_SERVER_KEY --build-arg PROP_DIR_SDR --build-arg PROP_DIR_DECODER --build-arg PROP_SERVER_KEY --build-arg PROP_DIR_SDR --build-arg PROP_DIR_DECODER
--cache-to=type=registry,ref=registry.chrz.de/cache/move2docker,mode=max
--cache-from=type=registry,ref=registry.chrz.de/cache/move2docker
-t registry.chrz.de/redsat/move2docker . -t registry.chrz.de/redsat/move2docker .
- docker buildx rm $BUILDER_ID - docker buildx rm $BUILDER_ID
environment: environment:

View File

@ -7,8 +7,18 @@ Based on https://github.com/MOVE-II/move2radio.
This container uses no blobs to build, however some proprietary code is needed. The distributed docker images only contain binary assets, this is achieved using docker multi-stage builds. The proprietary code is currently hosted at the LRZ GitLab by the MOVE-II team, and an older private mirror exists at the CHRZ Git server. It is forbidden to redistribute the proprietary code without permission, however binary assets compiled from it may be redistributed. This container uses no blobs to build, however some proprietary code is needed. The distributed docker images only contain binary assets, this is achieved using docker multi-stage builds. The proprietary code is currently hosted at the LRZ GitLab by the MOVE-II team, and an older private mirror exists at the CHRZ Git server. It is forbidden to redistribute the proprietary code without permission, however binary assets compiled from it may be redistributed.
## Usage ## Download
Use the scripts from the `scripts` directory to control the docker containers. Each script takes a parameter to configure the mode, either `gui` or `cli`. User Docker to download the precompiled binaries: `docker pull registry.chrz.de/redsat/move2docker`. This image is multi-arch and Docker will automatically select the correct sub-image based on the current architecture.
## Configuration ## Usage
Starting the container without any arguments opens a shell into the container. You can override the default entrypoint (`/app/run-cli.sh`) using `docker run --entrypoint "/app/run-gui.sh" ...`, which launches the GNURadio companion on start. The same behavior can be achieved by executing `gnuradio-companion` in the CLI session.
The GUI container needs to know which X11 server to connect to, this can be configured using `docker run --env DISPLAY=host.docker.internal:0.0 ...` when using Docker Desktop for Windows or OS X. On Linux `host.docker.internal` cannot be resolved so there you have to use something like `$(docker network inspect bridge --format='{{(index .IPAM.Config 0).Gateway}}')` (The gateway address of the `docker0` bridge interface) or its IP address directly like `172.17.0.1`, but note that your configuration may differ.
## Development
Use the `scripts/*-dev.sh` to build and run the docker container for local development. The other scripts will download and run the precompiled image.
The public docker image is built by the CI server using the `master` branch of this repository. Please use the `dev` branch for local development.
### Proprietary Code Server Configuration
Configure the proprietary code server using the file `config/config.sh` (see or copy `config/config.sh.example*`), and place or link your private key for the server access (`id_rsa`) there as well. Note that this key should not be protected with a password. Configure the proprietary code server using the file `config/config.sh` (see or copy `config/config.sh.example*`), and place or link your private key for the server access (`id_rsa`) there as well. Note that this key should not be protected with a password.

View File

@ -7,4 +7,4 @@ export PROP_SERVER_KEY=$(cat ./config/id_rsa)
docker build \ docker build \
--build-arg PROP_SERVER --build-arg PROP_SERVER_USER \ --build-arg PROP_SERVER --build-arg PROP_SERVER_USER \
--build-arg PROP_SERVER_KEY --build-arg PROP_DIR_SDR --build-arg PROP_DIR_DECODER \ --build-arg PROP_SERVER_KEY --build-arg PROP_DIR_SDR --build-arg PROP_DIR_DECODER \
-t registry.chrz.de/redsat/move2docker:$(arch) . -t move2docker:dev-$(arch) .

View File

@ -1,11 +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 registry.chrz.de/redsat/move2docker .

View File

@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
docker pull registry.chrz.de/redsat/move2docker:$(arch) docker pull registry.chrz.de/redsat/move2docker

View File

@ -1,3 +0,0 @@
#!/bin/bash
docker push registry.chrz.de/redsat/move2docker:$(arch)

9
scripts/run-dev.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/bash
cd "${0%/*}/.."
source ./config/config.sh
docker run -it --rm \
-v $(pwd)/data:/app/data:rw \
--env DISPLAY=host.docker.internal:0.0 \
move2docker:dev-$(arch)

View File

@ -6,4 +6,4 @@ source ./config/config.sh
docker run -it --rm \ docker run -it --rm \
-v $(pwd)/data:/app/data:rw \ -v $(pwd)/data:/app/data:rw \
--env DISPLAY=host.docker.internal:0.0 \ --env DISPLAY=host.docker.internal:0.0 \
registry.chrz.de/redsat/move2docker:$(arch) registry.chrz.de/redsat/move2docker