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

Add support for other platforms like ARM #175

Closed
Kovah opened this issue Nov 22, 2020 · 23 comments
Closed

Add support for other platforms like ARM #175

Kovah opened this issue Nov 22, 2020 · 23 comments
Labels
ToDo Simple task not related to a feature or bug

Comments

@Kovah
Copy link
Owner

Kovah commented Nov 22, 2020

Support for at least ARM would be cool to support LinkAce on Raspberry Pi's and similar devices.

@Kovah Kovah added the ToDo Simple task not related to a feature or bug label Nov 22, 2020
@Kovah Kovah added this to the v0.0.45 milestone Nov 22, 2020
@Kovah Kovah changed the title Test and implement support for other platforms Add support for other platforms like ARM Dec 18, 2020
@Kovah Kovah pinned this issue Dec 18, 2020
@Kovah
Copy link
Owner Author

Kovah commented Dec 19, 2020

This is going to be a huge task as all dependent Docker images are available for AMD64 only. Have to either find new base images or create them on my own.

@FullofQuarks
Copy link

LinkAce does work on armhf/aarch64. Not sure what other architectures there need to be. All dependent images support arm64. I have tested this on a Raspberry Pi 4 (thought I did need to swap Bitnami's MariaDB with the official image).

@Kovah
Copy link
Owner Author

Kovah commented Jan 11, 2021

Currently pushed to a later version because both images need to be rebuild with other base images to be working correctly. Neither Bitnami's PHP image nor the webdevps PHP Nginx image are compatible with ARM devices.

Needed replacements:

  • image with PHP 8, needs to support the requirements
  • image with PHP 8 and nginx, needs to support the requirements

If anyone has suggestions for images please share them with me. I prefer images which can be configured, instead of having to install everything on my own.

@Kovah
Copy link
Owner Author

Kovah commented Jan 19, 2021

Quick update: the build process for regular Docker images (PHP only) works. Will probably released somewhat later because I have to properly test the new image as it relies on a different base image.
See commit 891831e for the newly added Dockerfile.

@gianter962
Copy link

Hallo Kevin, i am interested to port LinkAce to raspberry pi 4 platform.
I think i found two images to work on:

https://hub.docker.com/r/tobi312/php
https://hub.docker.com/r/linuxserver/mariadb

What do you think about?

@Kovah
Copy link
Owner Author

Kovah commented Mar 9, 2021

Hi @gianter962, the only image missing at the moment is a combined image with both PHP and nginx installed. If you have a good working image that is also actively maintained, feel free to share it.

@gianter962
Copy link

gianter962 commented Mar 10, 2021

can you take a look at this?
https://hub.docker.com/r/tobi312/php --> fpm 8.0 or 7.4 - nginx over alpine or alpine slim

Kovah added a commit that referenced this issue Mar 10, 2021
@Kovah
Copy link
Owner Author

Kovah commented Mar 10, 2021

I have restructured the whole Docker build process. The two images rely on the official PHP image and are compatible with the following platforms: amd64, arm64, arm/v7.

👉 To test this properly, I ask interested users to try both images with their devices. The test images are available in a dedicated repository: kovah/linkace-test

  • multiplatform: the regular application with PHP FPM, separate web server needed
  • multiplatform-simple: the application with PHP FPM and nginx as a web server

The Docker compose files needed for this are available in the repository's dev branch. You have to replace linkace/linkace:latest with kovah/linkace-test:multiplatform.
The major difference to the previous Docker compose files is the absence of an nginx configuration file. It is now included in the image and only needs to be overwritten if you use the application with HTTPS and without a proxy in front of it.

@gianter962
Copy link

gianter962 commented Mar 13, 2021

Started to check from multiplatform-simple:
amd64 --> all works fine
arm/v7 --> got
10.5: Pulling from library/mariadb
ERROR: no matching manifest for linux/arm/v7 in the manifest list entries
mariadb image does not run on arm/v7 but it runs on arm64v8 only
For arm32 platform I would have found following image based on official mariadb
https://hub.docker.com/r/linuxserver/mariadb
arm/v8 --> with your mariadb image got error 500

Kovah added a commit that referenced this issue Mar 22, 2021
@Kovah
Copy link
Owner Author

Kovah commented Mar 22, 2021

I fixed some images and tested the multiplatform image on my Raspberry Pi 4 - and it worked! I am not able to run extensive tests for other platforms, so the images will be released in the next days with version 1.4.0.

@Kovah
Copy link
Owner Author

Kovah commented Mar 25, 2021

LinkAce 1.4.0 is now released and the Docker images support ARM now. 🥳

Please notice that you may have to change the database if you want to rn LinkAce on a ARM v7 platform.

@Kovah Kovah closed this as completed Mar 25, 2021
@galonsky
Copy link

hey, I'm trying to set this up from scratch on a raspberry pi 4b. all the supporting containers seem to be running fine, but I'm getting an error in the app container as soon as it starts: standard_init_linux.go:219: exec user process caused: exec format error

I'm using this image, and it seems to be armv7 locally (via docker image inspect) so I'm not sure what the issue is: https://hub.docker.com/layers/linkace/linkace/v1.4.0/images/sha256-71e0a5ba248a3f54f3f9466afc6389f0f20873dfe886ee1b8d7f9cf727efabbb?context=explore

any ideas?

@galonsky
Copy link

I noticed bitnami/php-fpm:8.0-prod doesn't have an armv7 image. maybe that's related?

@Kovah
Copy link
Owner Author

Kovah commented Mar 27, 2021

What the hell?! Docker Hub built some images despite having them disabled. 😟
I removed the build settings and restarted the new build process on GitHub. Correct images should be available in a minute.

@galonsky
Copy link

thanks! I managed to get all the containers running (nginx config needed some tweaking to work on the non-bitnami image - I'll document after everything is working)

but now I'm getting a 500 with this error:

[2071-05-12 03:41:52] production.ERROR: Epoch doesn't fit in a PHP integer {"exception":"[object] (ValueError(code: 0): Epoch doesn't fit in a PHP integer at /app/vendor/nesbot/c
arbon/src/Carbon/Traits/Units.php:136)

this is what I get for date in the app container:

/app/storage/logs # date
Sun Jan  0 00:100:4174038  1900

it seems the date/time is way misconfigured on the app container. I tried some suggestions from stack overflow like mounting some timezone/localtime directories but it didn't seem to help. any ideas?

@gianter962
Copy link

Same here, i got 500 in the test images too as wrote here
#175 (comment)

@Kovah
Copy link
Owner Author

Kovah commented Mar 27, 2021

@gianter962 please post the exact error message from the log files, if available. You may also set APP_DEBUG=true in your .env file.

@galonsky
Copy link

for anyone's reference, these are the changes I had to make to get things running (let me know if there's an easier way for any of this)

docker-compose.yml:

  • Using linuxserver/mariadb:arm32v7-latest image for db since the default one doesn't have ARM support
  • Using redis:6.0 image for redis since default doesn't have ARM support
  • custom command: redis-server --requirepass ${REDIS_PASSWORD} for redis since I think it doesn't take an env variable like the bitnami one, but not 100% sure on this one
  • Using nginx:1.19 image for Nginx since default doesn't have ARM support
  • Different mount location for nginx.conf because this image doesn't have server_blocks directory like the Bitnami one: - ./nginx.conf:/etc/nginx/conf.d/linkace.conf:ro

Nginx:

  • Had to have nginx.conf in my directory so it can be mounted (I think this should be in the "1. Copy all needed files" section in the Advanced Instructions, right?)
  • This image wasn't able to find fastcgi.conf as directed, so replacing that with these lines did the trick (no idea what I'm doing here, just found suggestions online):
#include fastcgi.conf;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

Full docker-compose: https://gist.github.com/galonsky/14184bd275b2ff0f7278c7a8b82d6082
Full nginx config: https://gist.github.com/galonsky/91dd1f1c53cd835cfc6f3e8457b99e89

@gianter962
Copy link

gianter962 commented Mar 27, 2021

switched APP_DEBUG=true i got SQLSTATE[42S02]: Base table or view not found: 1146 Table 'linkace.settings' doesn't exist (SQL: select * from settings where user_id is null) ... below the log file from /app/storage/logs
Using mariadb:latest (arm64v8) and linkace/linkace:simple

laravel-2021-03-27.log

docker-compose.yml.txt

[.env removed for security reasons by mod]

linkace.conf.txt

@Kovah
Copy link
Owner Author

Kovah commented Mar 27, 2021

@gianter962 The LinkAce database is missing. If you already completed the setup in the past, check your database. If you are starting fresh, please make sure you have SETUP_COMPLETED=false in your .env file and then run the setup.

@gianter962
Copy link

thank you a lot, solved with SETUP_COMPLETED=false

@Kovah Kovah unpinned this issue Mar 29, 2021
@bonnebulle
Copy link

bonnebulle commented Sep 4, 2024

EDIT : works following https://belginux.com/installer-linkace-avec-docker/


I got an error
mysqld: command not found
[ERROR] [Entrypoint]: mariadbd failed while attempting to check config
strange (and sad)
I will retry next day
have a nice one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ToDo Simple task not related to a feature or bug
Projects
Archived in project
Development

No branches or pull requests

5 participants