Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ARM file for Raspberry Pi 4 #7

Closed
mu88 opened this issue Jul 10, 2021 · 8 comments
Closed

ARM file for Raspberry Pi 4 #7

mu88 opened this issue Jul 10, 2021 · 8 comments

Comments

@mu88
Copy link

mu88 commented Jul 10, 2021

Hi 👋🏻
Thank you for your effort providing an ARM-based Joplin Docker image. When trying to pull florider89/joplin-server:latest on my Raspberry Pi 4, it fails with no matching manifest for linux/arm/v7 in the manifest list entries.
Could you also provide a Docker image for that platform?

@abhilesh
Copy link

I'm facing the same issue.

I am running a 64-bit kernel on Raspberry OS 10 and the output of my uname -a is
Linux raspberrypi 5.10.44-v8+ #1429 SMP PREEMPT Fri Jun 25 10:03:37 BST 2021 aarch64 GNU/Linux

Not sure why docker is trying to pull the arm image for florider89/joplin-server:latest
Running into the same no matching manifest for linux/arm/v7 in the manifest list entries.

Any suggestions?

@abhilesh
Copy link

I am not sure what docker uses to determine the architecture but I was able to pull the image by making two modifications in my docker-compose file

I used the florider89/joplin-server:master tag and also explicitly declared the platform by adding platform: linux/arm64 under services: --> app:

Hope this helps anyone facing the same issue.

@mu88
Copy link
Author

mu88 commented Jul 13, 2021

The output of uname -a on my Raspi 4 is Linux raspberrypi 5.10.17-v7l+ #1414 SMP Fri Apr 30 13:20:47 BST 2021 armv7l GNU/Linux. So I think it is a 32 Bit architecture, right?

@abhilesh
Copy link

You're right @mu88, the armv7l signifies that it is a 32 bit architecture. If you want to use joplin, you'll need a 64-bit kernel.
You can do that by flashing a 64 bit OS like Ubuntu on your Rpi4 or upgrade your kernel to 64 bit, the latest Raspbian OS beta supports it.

The migration is pretty straightforward and doesn't mess up with your existing installation much (at least for me it didn't), you probably will need to install 64bit versions of some libraries, but that should be it.

@mu88
Copy link
Author

mu88 commented Jul 14, 2021

Thank you @abhilesh! I will think about upgrading to Raspbian x64, but honestly I don't feel so comfortable with using a beta OS 😉

And could you please share your modified Dockerfile here?

@abhilesh
Copy link

So, ends up that joplin server requires an entire 64-bit OS and not just the 64-bit kernel. While I was able to pull the image and start the container, since the image wasn't built for a 32-bit OS, the joplin server wouldn't start.

The alternative for me was to flash a 64-bit OS and start from scratch when I came across this amazing post - https://www.raspberrypi.org/forums/viewtopic.php?p=1621085#p1621085

Sakaki managed to build a containerized 64-bit shell for the RPi4 and now the 'raspbian-nspawn-64' package is installable from the official Raspbian repo making installation a breeze.

My understanding of this method is that it creates a hybrid mode with the 64-bit image (debian-buster) running within a container on top of the base 32-bit Raspbian OS. All network interfaces are available within the 64-bit container, so it's almost like running processes natively on a 64-bit OS.

I was able to set this up on my RPi, as I already had a 64 bit kernel and didn't want to start from scratch. I was able to get the latest joplin server up and running inside the 64-bit container and have set up syncs successfully. It's very stable so far.

PS: I used the default docker-compose.yml from https://hub.docker.com/r/florider89/joplin-server with the 2.2.7-beta tag which I believe is the latest one.

@flosoft flosoft closed this as completed Aug 4, 2021
@mu88
Copy link
Author

mu88 commented Aug 28, 2021

@abhilesh Could you please describe what you mean by an entire 64-bit OS and not just the 64-bit kernel? Because on this page I get the impression that Raspberry Pi OS is a complete x64 OS and not just the Kernel 🤔

@abhilesh
Copy link

@mu88, I started out on the 32-bit Raspberry Pi OS (32-bit kernel and 32-bit userland) and mostly used docker to deploy web services. Most of the web services I used ran without any issues but then, I started coming across services like PhotoPrism that needed at least a 64-bit kernel on the Pi. This is possible by just upgrading the Pi kernel using rpi-update and then adding arm_64bit=1 in the /boot/config.txt file.

This above step gave me a hybrid environment (32-bit OS with 32-bit userland and 64-bit kernel). I then found out that for other apps like Joplin, this hybridization is not enough. At this point, I had already invested a bunch into getting the other services running and did not want to do a complete wipe to accommodate Joplin, at which point I came across the nspawn workaround I mentioned above. This enabled me to run a 64-bit OS with a 64-bit userland within a container on my 32-bit Raspberry Pi OS. I could install Docker inside the 64-bit container and deploy applications like Joplin that needed a 64-bit OS while keeping my existing, already deployed services intact.

If you were to start afresh, you could simply flash your Pi with a 64-bit OS (the resource you outlined works perfectly for this). You can then use flosoft's docker image to install Joplin Server on your Raspberry Pi. Hope this helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants