dovecot / docker

Docker image sources for Dovecot
Other
35 stars 8 forks source link

Native arm64 support #1

Closed shg closed 2 years ago

shg commented 2 years ago

I am in the process of migration from Intel Mac to M1. The current image works fine on M1 with emulation but I appreciate if you officially provide native arm64 version. Or it is also nice if you publish the official Dockerfile so that we can build one for arm processor.

cmouse commented 2 years ago

Hi, our dockerfiles don't actually compile dovecot, they just install it from packages.

sirainen commented 2 years ago

And providing arm64 would require doubling the packages (Debian, Ubuntu, RHEL, ...) I don't think people are using arm64 for servers much currently, so doesn't seem worth the effort yet. BTW. I'm using M1 for Dovecot development all the time.

vrusinov commented 2 years ago

dockerfiles don't actually compile dovecot, they just install it from packages

It should be easy to build arm64 version then. Can you publish dockerfiles somewhere?

schildbach commented 2 years ago

I second that, publishing the Dockerfile would be great!

cmouse commented 2 years ago

dockerfiles are published.

shg commented 2 years ago

I built the arm64 version (with slight modifications to the Dockerfile) and got it to work with the exact same configuration as the Intel environment. Thank you for the quick response!

Danrancan commented 1 year ago

I built the arm64 version (with slight modifications to the Dockerfile) and got it to work with the exact same configuration as the Intel environment. Thank you for the quick response!

How exactly did you do this and what steps did you take? I'm trying to install dovecot on a raspberry pi running ubuntu 20.04 server.

shg commented 1 year ago

@Danrancan Sorry I have not noticed your comment for a long time. I made the following modifications to the Dockerfile for version 2.3.17 and was able to build it on a M1 MacBook Pro. I haven't tried the newer versions.

diff --git a/Dockerfile b/Dockerfile
index 7ef7269..d74b62e 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM debian:10
+FROM --platform=arm64 debian:10

 LABEL org.opencontainers.image.authors="dovecot@dovecot.org"

@@ -9,7 +9,7 @@ ARG DEBIAN_FRONTEND=noninteractive

 ADD dovecot.gpg /etc/apt/trusted.gpg.d
 ADD dovecot.list /etc/apt/sources.list.d
-ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /sbin/tini
+ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-arm64 /sbin/tini

 RUN apt-get -y update && apt-get -y install \
   dovecot-core \
@@ -17,7 +17,7 @@ RUN apt-get -y update && apt-get -y install \
   dovecot-imapd \
   dovecot-ldap \
   dovecot-lmtpd \
-  dovecot-lua \
+  dovecot-auth-lua \
   dovecot-managesieved \
   dovecot-mysql \
   dovecot-pgsql \
docker build -t dovecot-arm64:2.3.17 .