I have pushed inkyshot onto my device and I’ve been attempting to read more on setting up multicontainers to add wificonnect to my system. I’m very lost. I started trying to learn how to set up a multicontainer through “multicontainer-getting-started” but I’m also confused where I’m pasting the commands, I’ve tried through CLI, the host terminal, and the main terminal of my inkyshot. I honestly have no clue how to go about this, could someone please help me out?
This blog post should give you a good idea on how to merge multiple apps in a single compose file: https://www.balena.io/blog/two-projects-one-device-turn-your-raspberry-pi-into-a-multitool/
Thank you, I took some time to follow the steps. I was able to merge the dockerfiles and everything. Now I’m attempting to push this project to my rpi but when I do the command I recieve a notification saying “Error: no “Dockerfile[.*]”, “docker-compose.yml” or “package.json” file”. Its odd as I have my docker file in my directory as docker-compose.yml
What am I doing wrong?
Dockerfile are two different things. You need a one
Dockerfile for each service, and a single
docker-compose.yml for the app. Take a look at the docker compose tutorial: https://docs.docker.com/compose/gettingstarted/.
When you merge multiple apps you create a “master”
docker-compose.yml, but each individual service has its own
I’ll look more into that, this is getting more and more complicated, but I hope to understand it. Thank you.
Basically, multi-container apps have this format in the
version: '2.0' services: first-service: build: ./first-service (a directory which contains a Dockerfile for first-service stuff)) restart: always network_mode: "host" second-service: build: ./second-service (a directory which contains a Dockerfile for second-service stuff) restart: always network_mode: "host"
This is just a simple example to which I’ve also added definitions for each container to always restart (if it stops) and to use the host device’s networks.
Hope this helps,
Sorry for needing so much assistance, I greatly appreciate the help as I’m just trying to learn. It was pushing the project perfectly but apparently im missing start.sh
What can I do?
The start.sh script is in the scripts folder which I took from the wifi-connect zip, I put the scripts folder in the merged app directory
In your Dockerfile, you must be copying the start.sh over to the container. Can you check if the file exists in the same relative path as the one that’s mentioned in your Dockerfile? Looks like you might have moved the Dockerfile or start.sh files in such a way that it’s no longer in the same relative path.
After some trial and error I placed the scripts folder in the same folder in the correct area. Thank you so much!
Thanks @MM2020! Let us know if there’s anything else we can do to help!