@idoodler, thanks for raising this issue and welcome to the balenaCloud forum!
Indeed bind mounts are not supported according to balena’s supported docker-compose fields page:
- https://www.balena.io/docs/reference/supervisor/docker-compose/
- Also relevant: https://www.balena.io/docs/learn/develop/multicontainer/#named-volumes
For the MagicMirror app, I think a workaround would be to use a Dockerfile with a COPY or ADD instruction. Place the Dockerfile in a ‘./magicmirror’ subdirectory of the directory containing the docker-compose.yml file. Then replace the docker-compose image
instruction with a build
instruction. Something along these lines:
# docker-compose.yml
version: '2'
services:
Browser:
restart: always
build: ./balena-wpe
privileged: true
MagicMirror:
restart: always
build: ./magicmirror
# ./magicmirror/Dockerfile
FROM bastilimbach/docker-magicmirror:raspberry
COPY ./config /opt/MagicMirror/config
COPY ./modules /opt/MagicMirror/modules
Before building the image, copy the contents:
from ~/magic_mirror/config
to ./magicmirror/config
from ~/magic_mirror/modules
to ./magicmirror/modules
This copy is necessary because the source directory of a COPY instruction needs to be relative to the directory containing the Dockerfile – the so-called “build context” directory.
Feel free to ask further questions and let us know how you get on with the project!