docker-firefox icon indicating copy to clipboard operation
docker-firefox copied to clipboard

ARM support

Open Azaverte opened this issue 5 years ago • 19 comments

Hello! Thanks for your container, it's neat!

I would like to run it on openmediavault. It worked properly on an x86 VM, but if I try it on my ARM (armhf) single-board computer, the container crashes with the following error:

standard_init_linux.go:190: exec user process caused "exec format error"

which, if I understand well, is due to an architecture mismatch. Are you positive your container indeed can't run on ARM? If so, would it take you a lot of work to change dependencies?

Azaverte avatar Nov 20 '18 19:11 Azaverte

Hi, for this container to support ARM, 2 things are needed::

  1. Need to have a baseimage for the ARM architecture.
  2. Have Firefox compiled for ARM.

For 1), this is possible and I'm already working on adding support for multiple architectures.

For 2), Firefox is currently not available for ARM on Alpine Linux, which means that Firefox needs to compiled manually. So for sure there will be some work to do on this side.

jlesage avatar Nov 21 '18 10:11 jlesage

For 1), this is possible and I'm already working on adding support for multiple architectures.

Any ETA for ARM support for the baseimage?

DomiStyle avatar Nov 26 '18 13:11 DomiStyle

Since I work on this during my free time, it’s hard to give an ETA. However, I can say that more than 90% of the work is done.

jlesage avatar Nov 26 '18 21:11 jlesage

Since I work on this during my free time, it’s hard to give an ETA.

No rush, was just wondering how far it is.

I can say that more than 90% of the work is done.

Good to hear, looking forward to it.

DomiStyle avatar Nov 27 '18 09:11 DomiStyle

+1 for the ARM support; just upping as this the last comment if from over an year ago.

kavejo avatar Mar 24 '20 08:03 kavejo

+1. It looks like there is a Firefox package for Alpine...

martin8801 avatar Apr 14 '20 15:04 martin8801

I'm trying to build my own baseimage, baseimage-gui and firefox image for my RPi4. Everything builds fine (a couple of small tweaks required, eg I had to use Firefox 75 as that's the only package available) and the firefox container boots and I can view Firefox in the browser for a second or so before I get the error below and the container shuts down. Crash Annotation GraphicsCriticalError: |[C0][GFX1-]: Receive IPC close with reason=AbnormalShutdown (t=1.88177) Waiting for Firefox to completely terminate... Firefox terminated.

I have just built the filezilla image and it's working fine (apart from some strange artefacts as shown below) so the issue seems to be Firefox specific.

Update The firefox-esr package is working fine

image

martin8801 avatar Apr 15 '20 14:04 martin8801

+1 for ARM image. Will be grateful a lot! @mtis88 Have you succeeded with building the image? Can you share it? Or the Dockerfile script to reproduce your steps

akarpenkoua avatar May 31 '20 10:05 akarpenkoua

+1

TheGeniusL avatar May 31 '20 21:05 TheGeniusL

@mtis88 If you managed to compile an image for RPi4, that would much anticipated.

TijnB avatar Jun 06 '20 19:06 TijnB

+1 for ARM image. Will be grateful a lot! @mtis88 Have you succeeded with building the image? Can you share it? Or the Dockerfile script to reproduce your steps

Though I'm not mtis88... :) I went few steps down this road (I want to build a docker image with jd2 and firefox, or at least separately jd2 and ff for my raspi), not finished yet, but seems promising so far:

  • clone the "baseimage" repository
  • copy "Dockerfile.alpine" to "Dockerfile"
  • change the "FROM" to base on "alpine:latest"
  • change S6_OVERLAY_ARCH and GLIBC_ARCH to "armhf" (my Raspi4 runs in armhf architecture right now, I am too lazy to fiddle with the sd card to resize the /boot partition...long story...).
  • build the image (takes a while, but not too long)
  • git clone the baseimage-gui repo, copy Dockerfile.alpine to Dockerfile, change "FROM" to base on the tag you supplied when building "baseimage".
  • build this image. This seems to take ages (no wonder, considering the compile amount there), I am at this step and will have it hopefully complete overnight (it is running on my Raspi, and I am not in a hurry).

I will report my progress here and maybe I'll start a fork...

DBa2016 avatar Jun 08 '20 01:06 DBa2016

Update:

  • baseimage-gui built successfully (openssl dhparams is what took so awfully long), next steps see below
  • git clone the jd2 repo
  • update Dockerfile to use the baseimage-gui built above; also update it to install openjdk-8-jre (since no corretto is available for armhf architecture)
  • build, run, fail because I forgot to update rootfs/startapp.sh to use the correct java path (/opt/jre/bin/java is for corretto, /usr/lib/jvm/java-1.8-openjdk/bin/java is for openjdk), correct rootfs/startapp.sh, build and run again (I am currently at this step, jd2 is now pulling updates; I am also seeing the artifacts mentioned by @mtis88, but they disappear on page reload, so for my purposes this is a suitable workaround)

Next steps are: clone docker-firefox repo, understand the build process, mange it into the above image, then build and run.

DBa2016 avatar Jun 08 '20 08:06 DBa2016

Another update: I managed to build the image and launch jd2 (not FF yet). An update of jd2 (something which should be done in 5 minutes tops) took more than 90 minutes on my Raspi4, so I am now trying a different approach, will see whether I get better performance and revisit this if the performance issue turns out to be caused by jd2/java.

DBa2016 avatar Jun 08 '20 10:06 DBa2016

Great stuff, looking forward to your updates!

TijnB avatar Jun 08 '20 14:06 TijnB

After exploring that other solution, I returned to this base profile, the performance issue seems to be affecting more the update process (which can be executed during image creation to a major extent). Still trying to make firefox work, right now it errors out. Permission/directory issue, will maybe investigate tomorrow.

DBa2016 avatar Jun 09 '20 23:06 DBa2016

FF turned out to be super-slow on my pi4, so I went for falkon for now. Performance is stil meh, but better. Valuable insights: switching to a 64-bit kernel halved build time. Docker itself is still 32bit though (since all userspace tools are 32bit), so arm64 images do not work. I will get a new SD card on Saturday and setup a pure arm64 pi4, hoping for another performance boost. For now, just the process of applying updates (after they have been downloaded) takes almost 25 minutes within the container (was worse before).

DBa2016 avatar Jun 11 '20 15:06 DBa2016

Hello, is it still a possibility that this can get Raspberry Pi 32-bit (armhf) support? A similar Docker container for Firefox (ich777/firefox) was able to pull it off and I was just curious if it could be applied here in the same fashion.

yllekz avatar Aug 26 '21 21:08 yllekz

Is there any update on this to run on a 64-bit Raspberry Pi?

MatthK avatar Sep 16 '21 07:09 MatthK

I created a version that works on ARM. It's not super fast on a Pi4, but it's usable.

fhriley avatar Apr 24 '22 00:04 fhriley

Latest image is now multi-arch.

jlesage avatar Oct 10 '22 03:10 jlesage