Read-Only - Devlopment Setup

I’m about to create a local development setup.
For this I have a docker compose with my containers.
Now I want to put some of my Github repos and their source files on the balenaOS, so that when starting my containers, they will mount the shared folder with my repos. Inside my docker container, I can compile the source code, and test the software of intreset.

I want to be able to edit the source code on my local development machine which runs the balenaOS, but since balenaOS is reado-nly, I can’t install git neither clone my git repos.

How can I accomplish this? Or is there any other way this should be done?

Hello @eco first of all welcome to the balena community!

if i understand well what you are trying to do is to edit the source code of your application from the balena device itself, right?

At balena everything must run on containers, so you will need to get into each service and made the modifications there not in the hostOS.

In the other hand, did you try to develop locally? Find more details here Develop locally - Balena Documentation

Thanks for quick reply!

That’s correct. I want to edit the source code on the Balena device.
Ok, as I understand, I’ll have to edit the source code on my own PC then use balena cli to push locally to the device. Then on the device itself I can test.

Yes @eco that’s correct! If you are still testing your source code, I strongly recommend to develop on Local mode and run balena push to the local mode device. It’s faster!

Let us know how it works for you!

Hmm I tried with the balena push command, but I got this error:

Bind mounts are not allowed

My docker compose file looks like this:

version: “2.1”

volumes:
shered-ros-bin:

services:
roscore:
build:
context: .
environment:
- ROS_HOSTNAME=roscore
- ROS_MASTER_URI=http://roscore:11311
links:
- service0
volumes:
- shered-ros-bin:/opt/ros/noetic

service0:
image: danjustdanyeah/ekb-gen4-carrier-base:1.0.0_bert
environment:
- ROS_HOSTNAME=service0
- ROS_MASTER_URI=http://roscore:11311
volumes:
- shered-ros-bin:/opt/ros/noetic
- ./ros_ws:/home/ros/ros_ws # Mount ros_ws folder

Your “Mount ros_ws folder” line looks like a bind mount which is not supported.