Closed emmaparker96 closed 3 years ago
Not sure really what your trying to do.
Not sure how you can build armhf containers in Windows?? or even why you would be building the container when you can just pull the pre-built version. If your running on Raspberry Pis then surely you'd be on a linux distro.
This probably has more to do with your python stuff, maybe ask for help on that image.
Your image is incorrect
db:
image: yobasystems/alpine:3.13.5-armhf
Surely that should be
db:
image: yobasystems/alpine-mariadb:10.5.9
Currently, I am in the process of implementing two Docker containers on the Raspberry Pi 2 - one for a Python and one for a mariadb database. The Python script is supposed to retrieve data from the database.
My .yml file to build the docker containers on Windows x64 :
Essential part of Python script:
I execute the commands on Windows x64:
Then on the Raspberry Pi 2, I execute the commands:
When I run
mariadb_db_1
, I get thrown right into the sh-shell (I don't know if database is running). Then when I runpython_app_2
from another shell, I get the following error from themysql.connector.connect
method:Can't connect to MySQL server on '%-.100s:%u' (%s)'
What could be the reason that it does not work under the Raspberry Pi 2? And why do I get thrown into the sh-shell with the database?