listmonk icon indicating copy to clipboard operation
listmonk copied to clipboard

Added arm64 arch & changed windows release to zip

Open arghyadipchak opened this issue 2 years ago • 5 comments

  • Added arm64 arch support (#544)
  • Changed windows release to .zip (instead of .tar.gz) which is easier for windows users

arghyadipchak avatar Jun 25 '22 11:06 arghyadipchak

Thanks for the PR. Have you tested whether the same tag (listmonk:latest) works for multiple architectures on DockerHub?

knadh avatar Jun 25 '22 12:06 knadh

Thanks for the PR. Have you tested whether the same tag (listmonk:latest) works for multiple architectures on DockerHub?

Made some updates and tested it, everything works fine now.

Updates:

  • Builds docker images for both amd64 and arm64
  • Windows binaries are released as zip
  • Fixed yarn.lock written in .gitignore
  • Version upgraded for all github actions

*Docker images are also released with tags {version}-amd64 and {version}-arm64. There is no way to configure goreleaser to solve this problem

arghyadipchak avatar Jun 25 '22 17:06 arghyadipchak

@mr-karan could you please check this out?

knadh avatar Jul 13 '22 15:07 knadh

*Docker images are also released with tags {version}-amd64 and {version}-arm64. There is no way to configure goreleaser to solve this problem

@arghyadipchak goreleaser and docker CLI both support this.

I guess there are 2 approaches here:

  1. Using docker_manifest, we can specify the platform/arch metadata to a list of images. The idea is that we build and push these 2 images separately, but using docker manifest create we can combine the image in a single tag.

Goreleaser does support the use of docker_manifest.

  1. There's an even simpler way using docker buildx:

Using buildx, we can build and give a --platform flag as a comma separated list of platforms that the docker image should support. This way we don't have to manually create a manifest.

docker buildx build --platform linux/amd64,linux/arm64/v8 --tag listmonk:latest

^ This should produce an image that will work on both the architectures.

So, basically if we want to push explicit platform tags then we need to use docker manifest. If we want a single tag that should work irrespective of the platform, we can simply add a platform flag.

mr-karan avatar Jul 14 '22 04:07 mr-karan

If we want a single tag that should work irrespective of the platform, we can simply add a platform flag.

Thanks @mr-karan. This is the correct approach.

knadh avatar Jul 18 '22 05:07 knadh

@arghyadipchak would you like to amend the PR?

knadh avatar Aug 19 '22 08:08 knadh

@arghyadipchak would you like to amend the PR?

I would love to, but currently I don't have time. I am closing this PR for now. I will find a better approach and contribute a new PR as soon as I can.

arghyadipchak avatar Aug 19 '22 09:08 arghyadipchak