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/Arm64 Docker Build #359

Open
ghost opened this issue Jul 31, 2020 · 22 comments
Open

Arm/Arm64 Docker Build #359

ghost opened this issue Jul 31, 2020 · 22 comments

Comments

@ghost
Copy link

ghost commented Jul 31, 2020

Would it be possible to add an Arm/Arm64 docker build?

@randomnicode
Copy link
Collaborator

Hey @TheFlatworm , want to submit some PRs for it? We're happy to add them

@ghost
Copy link
Author

ghost commented Aug 8, 2020

I'm a noob but looking into how to do this!

@jokeofweek
Copy link

I believe this should be fairly straightforward... would likely need a second Dockerfile (Dockerfile.armhf) and it should pull from a different root image.

Instead of

FROM adoptopenjdk:14-jre-hotspot

It should be

FROM arm32v7/adoptopenjdk:14-jre-hotspot

@yllekz
Copy link

yllekz commented Jan 1, 2021

Hi folks, does this exist? I'd like to deploy this to my Pi but I can't find an arm tag.

@randomnicode
Copy link
Collaborator

randomnicode commented Jan 19, 2021

Since tini has now been taken out from the Dockerfile in #437, you could build on your machine with buildx for crossplatform support.

#438 might provide a hint on how to do it

If you have support to build linux/arm64 (qemu and buildx):
-build airsonic-advanced (or put the war in install/docker/target/dependency as airsonic-main.war)

  • arm64 run: docker buildx --platform linux/arm64 --load -f install/docker/Dockerfile -t airsonicadvanced/airsonic-advanced:arm64-latest install/docker
  • armv7 run: docker buildx --platform linux/arm/v7 --load -f install/docker/Dockerfile -t airsonicadvanced/airsonic-advanced:armv7-latest install/docker

@nesasio93
Copy link

Building the image is something not everyone will be capable to do, especially when buildx is a experimental feature of docker. Are there plans to officially support arm/arm64? I would love to try this out on my RPI4! 😄

@yllekz
Copy link

yllekz commented Feb 1, 2021

Same honestly. I'm not a developer and I can't just "build it on my own machine" honestly.

@randomnicode
Copy link
Collaborator

Building the image is something not everyone will be capable to do, especially when buildx is a experimental feature of docker.

Same honestly. I'm not a developer and I can't just "build it on my own machine" honestly.

Fair enough.

okay, in the interest of expediting this, we can roll out an arm build, however it won't have gone through the same testing process. The war itself will be tested as part of the ci/cd, but the container image (for arm builds) may not be unless someone wants to contribute PRs

@nesasio93
Copy link

okay, in the interest of expediting this, we can roll out an arm build, however it won't have gone through the same testing process. The war itself will be tested as part of the ci/cd, but the container image (for arm builds) may not be unless someone wants to contribute PRs

That's great news! Thank you!

I believe this should be fairly straightforward... would likely need a second Dockerfile (Dockerfile.armhf) and it should pull from a different root image.

Instead of

FROM adoptopenjdk:14-jre-hotspot

It should be

FROM arm32v7/adoptopenjdk:14-jre-hotspot

If that is true the only difference should be the base image, so I would be confident in the arm version working as good as the amd64 version 😄

@randomnicode
Copy link
Collaborator

No, creating the Dockerfile isn't an issue (and the suggestion is being superseded by a multiplatform build anyway)

The bigger issue is testing of the container.

The base image isn't the only thing that is different, on each version we install the ffmpeg binaries etc (which is different because of the different base images)

@randomnicode
Copy link
Collaborator

As #463 was merged, airsonic-advanced should now be releasing multiplatform images to Docker hub now. You should be able to pull down the right architecture based on your docker platform

image

@randomnicode
Copy link
Collaborator

Please test and if it seems stable, we can close this issue.

@nesasio93
Copy link

It does not seem stable for me. If I access airsonic directly with IP:4040 on my Pi everything seems normal, but I can't play music. When I click "Play All" for an album all I see is this in my console:

image

Play queue stays empty.

@nesasio93
Copy link

It's another story when I access airsonic over my reverse proxy. Music is playing, but the play queue remains empty. Console is full of errors like this:

image

There seems to be a problem with the websocket, but it says it has opend a websocket?!
image

@randomnicode
Copy link
Collaborator

formatDuration is not defined

This does not seem like a docker issue but a browser issue, and no idea why it's happening with you especially since the function is defined. Perhaps you're blocking loading javascripts? if you look at the page structure, do you spot a utils.js import?

problem with the websocket

Not sure which proxy you're using, but you need to set up your proxy rules right to allow sockjs through

@ghost
Copy link
Author

ghost commented Feb 3, 2021

I am getting this error:

OpenJDK Server VM warning: No monotonic clock was available - timed services may be adversely affected if the time-of-day clock changes

@randomnicode
Copy link
Collaborator

OpenJDK Server VM warning: No monotonic clock was available

A quick Google shows this is a problem with Ubuntu 20.04. You need to update libseccomp to 2.4.2 or later on your Raspberry Pi host. Latest version of libseccomp might not be available from the repo for Pi, but you need to find an alternative place to download and update it:

tianon/docker-brew-ubuntu-core#196

AdoptOpenJDK/openjdk-docker#469

AdoptOpenJDK/openjdk-docker#479

@nesasio93
Copy link

formatDuration is not defined

I started the server again and that error disappeared! Now everything works as expected. Weird, but nice! 😄

problem with the websocket

As you can see in the screenshot the error is shown, but the websocket is open and works. I'm using Traefik as a reverse proxy, because I like its simplicity and easy configuration with docker labels. Treafik supports websockets without any configuration. Only JAVA_OPTS=-Dserver.forward-headers-strategy=native is needed for airsonic-advanced to function correctly, it seems.

Looks like I'm switching from airsonic to airsonic-advanced 😎 Big thanks to all its developers!!!

@ghost
Copy link
Author

ghost commented Feb 4, 2021

A quick Google shows this is a problem with Ubuntu 20.04

Thank you - what was throwing me off was that I am running Debian buster which I now know has the same issue with an outdated libseccomp and that the correct package name is libseccomp2. After installing with dpkg everything seems to work! I updated JAVA_OPTS=-Xmx to about 3mb and I will run as a test for few weeks to test stability. Thank you so much!

@viperey
Copy link

viperey commented Feb 24, 2021

Tested with following setup & results:

Setup

Rpi 2b, Docker container, image version airsonicadvanced/airsonic-advanced:edge-11.0.0-SNAPSHOT.20210217223709 and no further settings except for the volumes.

Devices

When checking in the browser I got the same result as #359 (comment)
When checking via music stash (the android app) the music plays perfectly.

Edit.

Doubled check in the browser on a different device and this time the airsonic frontend was capable of reproducing music. After researching a bit i ended up looking at the different players the instance had created and realized that when trying to use the very first one created (read as player 0) it won´t work and it would lack a "type" value. However, when switching to a different/new player, the browser would reproduce the music perfectly.
So, I'm totally noob about this, but seems like a configuration problem at bootstrap phase, but as I said, I lack in-depth knowledge about this.

@yllekz
Copy link

yllekz commented Mar 25, 2021

Reporting in on my Pi 4B with the "latest" tag. The app deploys just fine and I can configure it, but I cannot play music in the browser in Firefox on Windows.

Edge on Windows can play just fine so I guess it's a Firefox problem. I was able to get music to play in Safari on iOS too.

Update: It might be a false alarm with either an extension or my Firefox Profile, as it works in a Private Window. I'll investigate this on my own.

@sunkup
Copy link

sunkup commented Nov 2, 2021

Reporting in on my Pi 4B with the "latest" tag. The app deploys just fine and I can configure it, but I cannot play music in the browser in Firefox on Windows.

Edge on Windows can play just fine so I guess it's a Firefox problem. I was able to get music to play in Safari on iOS too.

Update: It might be a false alarm with either an extension or my Firefox Profile, as it works in a Private Window. I'll investigate this on my own.

got the same problem. Did you find out why? :)

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

6 participants