I currently have a Raspberry Pi 3 which I am trying to host a webpage on locally. The page was originally hosted on a VM (Ubuntu) and the Pi loaded the webpage via the internet, however due to changes in the building the Pi can no longer connect to the internet. The site uses Nginx and Docker Compose linked to a MySQL database.
At this point I have moved all the related files to the Pi and in theory I should be able to run the docker-compose up -d
command to pull the images, disconnect the Pi from Ethernet once pulled (working at my desk but needs to be in a room without Ethernet and hooked up to a screen, don't ask its a pain) but after its been pulled once it shouldn't need internet again as its hosted locally.
Now for the actual issue, during the pull most things went through fine however it gets stuck at MySQL with the error in the title (currently pulling mysql:latest
but I've tried some other versions). I've looked into it and as I understand its because the Raspberry Pi 3 is 32-bit architecture whereas MySQL images are only x86_64, however this info was two years old. The reason for this question is to ask if anyone knows if any MySQL images came out that work on a Raspberry Pi 3 as I can't find any, or if anyone found a solution to this issue.
TLDR;
Steps:
curl -L https://get.docker.com -out installdocker.sh
// skip if docker installedchmod +x installdocker.sh
// skip if docker installed./installdocker.sh
// skip if docker installedusermod -aG docker pi
// or whatever your username is.. skip if docker installeddocker run -d -p 3306:3306 --name mysql mysql/mysql-server
docker container logs mysql
// find the root password in the logs heredocker exec -it mysql mysql -uroot -p
// enter root password when promotedall done. if you need remote network access to the mysql, well i'm still figuring that one out.
did you try specifying the architecture ? --platform=linux/arm64
docker run -d -p 3306:3306 --platform=linux/arm64 --name mysql mysql/mysql-server
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With