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!
Hey, I am trying to redo this because I was to give this as a gift and realized the order of which the services started was not right. Plus the services in general are no longer updating properly so I decided to restart. Im am running into the same issue I had earlier, when I attempt to push this file it says “Error: no “Dockerfile[.*]”, “docker-compose.yml” or “package.json” file found in source folder “.””
I have a master docker-compose.yml in the main folder, I have the 2 services copied inside correctly. I have two seperate dockerfiles for the services, both of which are in two seperate folders and are pathed within the “build:” of the docker-compose.yml. What am I doing wrong?
Thank you guys for all the help, it means to much!
Hi there @MM2020 could I check what you’re trying to do here? It looks like maybe you’re still trying to add WiFi connect to Inkyshot, but the cause of the issue and confusion might be that the Inkyshot app now includes WiFi connect.
When we first released the Inkyshot app it didn’t include WiFi connect, but it now includes it. Inkyshot was changed to a multicontainer application and so the Dockerfile moved one level deeper. However if you’re still trying to add WiFi connect there should be no need to do that any more and you can push that project as it is (or use the DWB button!).
Your folder structure screenshots are a little confusing so it’s hard for me to work out what files you’re intending to use, but it does look correct from what I can make out. As long as you’re executing the push command from within the
balena-wifi-inky directory it should work, but as I said I’d recommend just pushing the latest version of Inkyshot which now includes WiFi connect, if that’s all you’re trying to do
Wanted to check in to see if you’ve tried using the latest Inkyshot release that includes Wi-Fi Connect, per @chrisys ’ recommendation. Here’s a link to the repo: GitHub - balenalabs/inkyshot: Get a daily random inspirational quote delivered direct to your desk with Inkyshot. Build multiple Inkyshots and share the inspiration with your friends, family and loved ones ❤️
Looking at the history of this thread, it looks like your application has been on quite the adventure with all the learning and modding. I’d try starting fresh with the latest Inkyshot. That way, you get all the latest and the folder structure will be much cleaner.
Let us know if you need any help!