huan / docker-simple-mail-forwarder

Simplest and Smallest Email Forward Service based on Docker.
https://hub.docker.com/r/zixia/simple-mail-forwarder/
Apache License 2.0
544 stars 88 forks source link

Use `docker buildx` to add arm platform to our docker image #76

Closed huan closed 3 years ago

huan commented 4 years ago

Now docker can Building Multi-Architecture Docker Images With Buildx which is very nice.

We use a different branch/tag for armhf support in the past, I believe it's time to use the latest docker buildx technology now.

Related to: #52 #9

huan commented 4 years ago

We have just published an experimental version of SMF 1.2:

$ docker buildx imagetools inspect zixia/simple-mail-forwarder:1.2
Name:      docker.io/zixia/simple-mail-forwarder:1.2
MediaType: application/vnd.docker.distribution.manifest.list.v2+json
Digest:    sha256:7cacf28ae8a6d86c6dab3d42dc5dd0464235f7cd8de524bb12c53aec11129398

Manifests: 
  Name:      docker.io/zixia/simple-mail-forwarder:1.2@sha256:b68f59095e5c38bd22677885e9c78e2bb9c4e9e810059aadde6ab650cc3d204a
  MediaType: application/vnd.docker.distribution.manifest.v2+json
  Platform:  linux/amd64

  Name:      docker.io/zixia/simple-mail-forwarder:1.2@sha256:45de2c7c96ebba77ed708e221cdb79e03ac18f8c20e94a9c75af80e49a28748c
  MediaType: application/vnd.docker.distribution.manifest.v2+json
  Platform:  linux/arm/v6

  Name:      docker.io/zixia/simple-mail-forwarder:1.2@sha256:e22830cca614c2631e698261dcfd182b3a66bc4fd0d78881b1c9896ae623c80e
  MediaType: application/vnd.docker.distribution.manifest.v2+json
  Platform:  linux/arm/v7

Please let me know if you can confirm any of those versions works as expected.

huan commented 3 years ago

Implemented by https://github.com/huan/docker-simple-mail-forwarder/commit/cd1410d2b5762ec2039d66d2cd9c751d7d195374

huan commented 3 years ago

We have republished v1.3 with multi-platforms docker image support (powered by buildx), please test and let me know whether it works under your platform.

huan commented 3 years ago

Hi @dimitrovs, please take a look at our new v1.3 version of multi-platforms docker images which can manage all architectures (arm/x86) in the same master branch!

mrsufgi commented 3 years ago

maybe im doing something wrong but - image

the container restarts after that, stuck on a loop (arm64, rock pi 4A)

huan commented 3 years ago

@mrsufgi It seems that the arch is not right for your platform:

cannot execute binary file: Exec format error

Could you please tell us what docker image platform are you using?

We will use the arm version from https://github.com/just-containers/s6-overlay/releases/, please let me know if you can confirm it can work with the arm64 with rock pi 4A or not:

https://github.com/huan/docker-simple-mail-forwarder/blob/044933af0495eff8b5c58b7f8a5358bf0432400f/script/install-s6-overlay.sh#L13-L21

Update

According to this SO answer: Differences between arm64 and aarch64

So AArch64 and ARM64 refer to the same thing.

Maybe we need to use the aarch64 version of s6-overlay for aarch64 and armv8l?

huan commented 3 years ago

The latest SMF with v1.3.1 has been published.

Please try to upgrade to it to see if your problem has been solved or not on the arm64 rock pi 4A.

mrsufgi commented 3 years ago

docker image is still 1.3 (and latest is still 1.3), just removed local image and started again, same error.

Linux rockpi-4a 5.8.12-rockchip64 #20.08.5 SMP PREEMPT Sun Sep 27 12:47:16 CEST 2020 aarch64 GNU/Linux

@huan I deleted my existing images and pulled again (1.3, 1.3.1 wasn't available). I will try again, but that didn't seem to work :O

guysoft commented 3 years ago

Just tried latest and 1.3 tag. They seem not to work. The container boot-loops. If I run it from entrypoint: /bin/sh then run the entrypoint manually I get:

s6-supervise syslog-ng: warning: can't happen: timeout while the service is up!
s6-supervise postfix: warning: can't happen: timeout while the service is up!

And it keeps going on like that.

Raspsberry Pi OS with armf userspace and 64bit kernel.

huan commented 3 years ago

We have created a new issue to track the arm 64 architecture and let's close this finished issue.