From ed127fb010ef90dc0b151dab0905732043ff1ae0 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 21 Feb 2024 16:55:54 -0800 Subject: [PATCH] dev-env: adding docker compose based env --- .gitignore | 1 + README.md | 15 +++++++++++++++ dev.yml | 18 ++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 dev.yml diff --git a/.gitignore b/.gitignore index 0e21803108..eacd34e76f 100644 --- a/.gitignore +++ b/.gitignore @@ -13,4 +13,5 @@ Pipfile Pipfile.lock poetry.lock registry/ +workspace/ diff --git a/README.md b/README.md index e0bb7bf56c..c0d135397f 100644 --- a/README.md +++ b/README.md @@ -89,3 +89,18 @@ BlueOS is designed to perform optimally across a wide range of systems. Our late - **amd64:** This is the architecture used by most desktop and laptop computers. A typical example is any modern PC running a 64-bit version of Linux. **Not fully supported.** Right now we officially support the Raspberry Pi 3 and 4, but the system should "just work" on all listed architectures with the correct docker binds. + +## Deveompment Environment + +Docker based development environment is available for via the dev.yml docker compose file. This will start a development environment with all the required services as well as mount all of the needed directories in this repository for development. + +```bash +docker compose -f dev.yml up +``` + +when restarting the development environment you may need to remove the volumes to ensure that the development environment is clean. + +```bash +docker compose -f dev.yml down +``` + diff --git a/dev.yml b/dev.yml new file mode 100644 index 0000000000..57be0abb70 --- /dev/null +++ b/dev.yml @@ -0,0 +1,18 @@ +version: '3.7' +services: + blueos-core: + image: bluerobotics/blueos-core:1.2.0-beta.6 + container_name: blueos-core + privileged: true + network_mode: host + volumes: + - ./core/start-blueos-core:/usr/bin/start-blueos-core + - ./core/services:/home/pi/services + - ./workspace/config:/root/.config + - ./workspace/userdata:/usr/blueos/userdata + - ./workspace/logs:/var/logs/blueos + - /etc/resolv.conf:/etc/resolv.conf + - /run/udev:/run/udev + - /etc/machine-id:/etc/machine-id + - /var/run/docker.sock:/var/run/docker.sock + pid: "host"