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 architectures for the docker image #1130

Closed
Areedtz opened this issue Aug 8, 2022 · 3 comments · Fixed by #1134
Closed

Add support for other architectures for the docker image #1130

Areedtz opened this issue Aug 8, 2022 · 3 comments · Fixed by #1134
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@Areedtz
Copy link
Contributor

Areedtz commented Aug 8, 2022

The docker image is currently only built for the amd64 architecture (x64).

Adding support for more architectures like arm64, would make it possible to host ghostfolio on more devices, such as Raspberry Pis.

It seems like it's possible to do this using docker's buildx command as can be seen in this blogpost.

@dtslvr
Copy link
Member

dtslvr commented Aug 8, 2022

Hi @Areedtz

Thanks for creating this ticket. The topic has already been raised multiple times: Docker multiplatform image (#1030)

Are you interested in creating the setup with buildx? Either with Travis as the linux/amd64 image is currently built or with GitHub Actions as it seems to be easier according to the blog post.

I'm looking forward to your feedback.

@dtslvr dtslvr added the duplicate This issue or pull request already exists label Aug 8, 2022
@Areedtz
Copy link
Contributor Author

Areedtz commented Aug 9, 2022

Hi @dtslvr

Sorry, I only searched in issues and didn't find the topic there.

I just tested buildx locally, as well as tried to build the dockerfile on my Raspberry Pi directly, but it seems like there might be an issue when using arm64 and docker, as I get an error during yarn install when loading the prisma schema:

#0 754.1 $ prisma generate && ngcc --properties es2020 browser module main
#0 761.4 Prisma schema loaded from prisma/schema.prisma
#0 763.2 Error: Get Config: Unable to establish a connection to query-engine-node-api library. It seems there is a problem with your OpenSSL installation!
#0 763.2 Details: Unable to require(`/ghostfolio/node_modules/prisma/libquery_engine-linux-arm64-openssl-1.1.x.so.node`)
#0 763.2  Error loading shared library ld-linux-aarch64.so.1: No such file or directory (needed by /ghostfolio/node_modules/prisma/libquery_engine-linux-arm64-openssl-1.1.x.so.node)
#0 763.2
#0 763.2 Prisma CLI Version : 4.1.1

I don't get this error when running yarn install outside of docker on my Raspberry Pi.

Seems like it might be an issue with the node alpine image.

I'll try to convert the image to a -slim variant and see if it fixes it. Would it be okay to use that in the future if it fixes the arm64 issues and the image size doesn't change much?

@Areedtz
Copy link
Contributor Author

Areedtz commented Aug 9, 2022

Hi @dtslvr

I've added a draft pull request #1134 with a suggestion for a solution, but it also introduces some points to discuss, such as using the slim variant instead of the alpine variant of node.

@dtslvr dtslvr linked a pull request Aug 9, 2022 that will close this issue
@dtslvr dtslvr added enhancement New feature or request help wanted Extra attention is needed and removed duplicate This issue or pull request already exists labels Aug 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants