aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorThomas Van Iseghem <[email protected]>2023-03-09 18:02:08 +0100
committerThomas Van Iseghem <[email protected]>2023-03-09 18:02:08 +0100
commitd3ab9d161e5f30247a6e59359ba1d93c41116305 (patch)
tree14effdd1fea52aefe39c6ba52a38a62c8f836b79
parente31fa6e6108a3eec2a7685d21c00ef81cd6bb79c (diff)
downloadOpenCortex-d3ab9d161e5f30247a6e59359ba1d93c41116305.tar.gz
OpenCortex-d3ab9d161e5f30247a6e59359ba1d93c41116305.zip
Added a docker compose file for easier cli
-rw-r--r--QC-dev-environment/REAME.md18
-rw-r--r--QC-dev-environment/docker-compose.yaml21
2 files changed, 38 insertions, 1 deletions
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