AtomGraph / LinkedDataHub

The low-code Knowledge Graph application platform. Apache license.
https://atomgraph.github.io/LinkedDataHub/
Apache License 2.0
483 stars 120 forks source link

Support for linux/arm(64/v8) docker images #149

Closed beepsoft closed 1 year ago

beepsoft commented 1 year ago

Hi,

I just tried to install LinkedDataHub on my development M1 MacBook Pro and docker-compose fails with:

linkeddatahub-varnish-end-user-1  | Error:
linkeddatahub-varnish-end-user-1  | Message from VCC-compiler:
linkeddatahub-varnish-end-user-1  | Assert error in vju_subproc(), mgt/mgt_jail_unix.c line 212:
linkeddatahub-varnish-end-user-1  |   Condition((initgroups(vju_user, vju_gid)) == 0) not true.
linkeddatahub-varnish-end-user-1  |   errno = 1 (Operation not permitted)
linkeddatahub-varnish-end-user-1  | qemu: uncaught target signal 6 (Aborted) - core dumped
linkeddatahub-varnish-end-user-1  | Running VCC-compiler failed, signal 6
linkeddatahub-varnish-end-user-1  | VCL compilation failed

As I see all atomgraph images on dockerhub support only linux/amd64. Most of them seem to work fine (although quite slow) via qemu on M1, but the atomgraph/varnish:6.0.11 images used by the varnish-admin and varnish-end-user services fail with the above error.

Would it be possible to build and publish images to dockerhub supporting linux/arm64/v8 as well? Or provide a workaround to build these images when running docker-compose up --build in LinkedDataHub?

namedgraph commented 1 year ago

Thanks for the report. Hard to say anything right now because my docker-compose up --build on M1 hangs on this Dockerfile command: https://github.com/AtomGraph/LinkedDataHub/blob/master/Dockerfile#L175

Supposedly there's a way to run Docker with Rosetta on Mac, but I don't see that option under "Features in development" :/

namedgraph commented 1 year ago

After running Terminal in Rosetta, I get the same error. No idea what the cause is :) I'll write to the Varnish list.

namedgraph commented 1 year ago

Varnish list thread: https://www.mail-archive.com/varnish-misc@varnish-cache.org/msg08744.html

beepsoft commented 1 year ago

Thanks for the report. Hard to say anything right now because my docker-compose up --build on M1 hangs on this Dockerfile command: https://github.com/AtomGraph/LinkedDataHub/blob/master/Dockerfile#L175

I also encountered this. But after a couple of trials it did execute all the keytool -import commands.

As for Varnish: my current workaround is that I copied the contents of https://github.com/AtomGraph/varnish to LinkedDataHub and used

  varnish-admin:
    build: ./varnish

instead of

  varnish-admin:
    image: atomgraph/varnish:6.0.11

in docker-compose.yaml. With all these and with a little luck with ./import-letsencrypt-stg-roots.sh I could start the project.

Anyways, thanks for taking care of M1 issues!

beepsoft commented 1 year ago

I am running Docker Desktop 4.16.2 (95914), Docker Engine Engine: 20.10.22 and just tried the "Use Rosetta for x86/amd64 emulation on Apple Silicon" option. Now it seems to start all right with the stock docker-compose.yml:

linkeddatahub-varnish-admin-1     | Debug: Version: varnish-6.0.11 revision a3bc025c2df28e4a76e10c2c41217c9864e9963b
linkeddatahub-varnish-admin-1     | Debug: Platform: Linux,5.15.49-linuxkit,x86_64,-junix,-smalloc,-sdefault,-hcritbit
linkeddatahub-varnish-end-user-1  | Debug: Version: varnish-6.0.11 revision a3bc025c2df28e4a76e10c2c41217c9864e9963b
linkeddatahub-varnish-end-user-1  | Debug: Platform: Linux,5.15.49-linuxkit,x86_64,-junix,-smalloc,-sdefault,-hcritbit

Even ./import-letsencrypt-stg-roots.sh runs all right (tried multiple times).

namedgraph commented 1 year ago

@beepsoft can we consider this solved?

beepsoft commented 1 year ago

With Rosetta enabled it is ok now as a workaround until you are able to build arm images.