From d3ab9d161e5f30247a6e59359ba1d93c41116305 Mon Sep 17 00:00:00 2001 From: Thomas Van Iseghem Date: Thu, 9 Mar 2023 18:02:08 +0100 Subject: Added a docker compose file for easier cli --- QC-dev-environment/REAME.md | 18 +++++++++++++++++- QC-dev-environment/docker-compose.yaml | 21 +++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 QC-dev-environment/docker-compose.yaml diff --git a/QC-dev-environment/REAME.md b/QC-dev-environment/REAME.md index 5a7e588..5964867 100644 --- a/QC-dev-environment/REAME.md +++ b/QC-dev-environment/REAME.md @@ -20,7 +20,9 @@ Once you've got the update file, you can put it inside the `filesystems` directo ### Running the container -It needs to run privileged since we need to run the `mount` command inside it. You can run it without the `--privileged` path if you're not planning to mount the QC's file system and just want to compile something +It needs to run privileged since we need to run the `mount` command inside it. You can run it without the `--privileged` path if you're not planning to mount the QC's file system and just want to compile something. + +The `mount` folder is optional. But it's an easy way to get files from to host inside the container and vice versa. ``` docker run --privileged -it -p 5900:5900 \ @@ -30,6 +32,20 @@ docker run --privileged -it -p 5900:5900 \ cortex-dev ``` +Another way is to use `docker compose`. In the `docker-compose.yaml` file, all volumes are already defined. This means you only have to define the update file in the `environment` section. + +To use this first run the service in detached mode + +``` +docker compose up -d +``` + +After that you can attach to the container using + +``` +docker compose exec cortex-dev /bin/bash +``` + When attached to the docker container's shell, there is one post-install step left. Run the following command: ``` diff --git a/QC-dev-environment/docker-compose.yaml b/QC-dev-environment/docker-compose.yaml new file mode 100644 index 0000000..975726b --- /dev/null +++ b/QC-dev-environment/docker-compose.yaml @@ -0,0 +1,21 @@ +# Docker compose file for easy volume mounting and running of the container + +services: + cortex-dev: + image: cortex-dev:latest + build: + context: . + dockerfile: Dockerfile + tags: + - cortex-dev:latest + + volumes: + - ./filesystems:/qc-fs + - ./mount:/mnt + + environment: + # Edit this to your needs. This should be just the file name, not the path. + - UPDATE_FILE=2.0.1.bin.gz + + privileged: true + entrypoint: /bin/bash -c "while true; do sleep 1; done" \ No newline at end of file -- cgit v1.2.3