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 building docker image for linux/arm64 #494

Merged
merged 6 commits into from
May 29, 2022

Conversation

kfiven
Copy link
Collaborator

@kfiven kfiven commented Apr 19, 2022

Description

This PR add support to build docker image for linux/arm64 platform. Currently we only have it for linux/amd64.

Fixes #489

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Preview: https://6291e81eb669225c2ec924b6--pr-cinny.netlify.app
⚠️ Exercise caution. Use test accounts. ⚠️

@kfiven
Copy link
Collaborator Author

kfiven commented Apr 19, 2022

Btw build times has gone 10x, and I don't know why.

Copy link
Contributor

@GoliathLabs GoliathLabs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kfiven, since we use qemu to build arm64 (a non-native platform for the gh-action VMs), it takes much longer. It would be recommended to build arm64 images only when a new tag is pushed (as possibly multiple build processes can run at the same time and overwrite the other one, depending on which one finishes first)

@anthr76
Copy link

anthr76 commented May 19, 2022

I would like to have this merged as I have a multi-arch Kubernetes cluster I would like to deploy this on.

@ivanjx
Copy link

ivanjx commented May 25, 2022

why not just build with whatever system you are running on then just use the arm64 of nginx for example?

@ajbura
Copy link
Member

ajbura commented May 28, 2022

linux/arm/v7 is also requested in issue #489, is it possible to build that also?

@kfiven
Copy link
Collaborator Author

kfiven commented May 29, 2022

No, we have a dependency that needs a library that is not available on arm/v7 yet https://github.com/kfiven/cinny/runs/6072704815?check_suite_focus=true#step:7:565

 > [linux/arm/v7 builder 4/6] RUN npm ci:
#31 421.6 npm ERR! code 1
#31 421.6 npm ERR! path /src/node_modules/sharp
#31 421.6 npm ERR! command failed
#31 421.6 npm ERR! command sh -c (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
#31 421.6 npm ERR! sharp: Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.10.6/libvips-8.10.6-linuxmusl-armv7.tar.br
#31 421.6 npm ERR! sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
#31 421.6 npm ERR! sharp: Installation error: Prebuilt libvips 8.10.6 binaries are not yet available for linuxmusl-armv7

@kfiven kfiven merged commit d0fd654 into dev May 29, 2022
NovaAndrom3da pushed a commit to NovaAndrom3da/neocinny that referenced this pull request Nov 23, 2023
* Update docker-pr.yml

* setup docker build for linux/arm64

* Update prod-deploy.yml

* Apply PR suggestion
@kfiven kfiven deleted the multiple-docker-build branch May 5, 2024 23:22
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

Successfully merging this pull request may close these issues.

[feat] Multi platform docker image
5 participants