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

ci: modify publish-docker workflow to push for ARM platforms #2719

Merged
merged 1 commit into from
Oct 1, 2022

Conversation

piraces
Copy link
Contributor

@piraces piraces commented Oct 1, 2022

Closes #2524

Description

This PR modifies the publish-docker.yml workflow in order to publish the docker image for ARM based platforms.
Now it pushes images for the following platforms:

  • linux/amd64: already existing, default platform
  • linux/arm/v7
  • linux/arm64/v8

This will add support for new Apple computers with M-series chips, and newer Raspberry Pi (among other systems as well).

Checks

  • My pull request adheres to the code style of this project
  • My code requires changes to the documentation
  • I have updated the documentation as required
  • All the tests have passed

Additional Information

As the original base image node:lts-slim supports the platforms linux/amd64, linux/arm/v7 and linux/arm64/v8, we can build for those platforms too without problem.

The workflow modifications are based on the docker/build-push-action docs for Multi-platform image. I have added two steps to setup QEMU and buildx as the docs indicate (in order to have support for multiple platforms and be able to build multi-platform images, accordingly).

I have tested and run the workflow in my fork publishing to Docker Hub here. There you can test if you want the current branch (I have been testing with QEMU by myself).

As you can see in Docker Hub multiple platforms are now listed (in my part). This is the expected result when this PR gets merged and then making a release.

The only con of this approach (but inevitable), is that the Build and push Docker image takes about 20min instead of 5 minutes as now... but this is due to building for two newer platforms with QEMU.

Note: I have also modified the reference for some actions in the workflow to target the latest version of the action, instead of a fixed commit (I see this more stable than a fixed commit that can be older). Nevertheless, if this is a problem I can go back and make a commit reference.

@piraces piraces force-pushed the feat/multi-arch-docker-image branch from 9502be7 to 39f2e28 Compare October 1, 2022 15:36
Copy link
Member

@liyasthomas liyasthomas left a comment

Choose a reason for hiding this comment

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

LGTM 💯

@liyasthomas
Copy link
Member

Hi @piraces, thank you for this quick PR.

@liyasthomas liyasthomas merged commit fd7d096 into hoppscotch:main Oct 1, 2022
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.

[feature]: ARM based docker image
2 participants