docker-mailserver/docker-mailserver

mailserver on a raspberry pi

schelv opened this issue · 15 comments

Hi!

I'm trying to get the mail server to run on a raspberry pi.
To achieve this I've modified the Dockerfile here and there e.g. :

  • change the base image (because ARM)
  • replace the apt installation of the filebeat package with a download from somewhere else. (because ARM)

The current error when I try to build the image is the following:
chown: invalid user: ‘syslog:root’

I get this at at the following Dockerfile instruction:
# Configuring Logs RUN sed -i -r "/^#?compress/c\compress\ncopytruncate" /etc/logrotate.conf && \ mkdir -p /var/log/mail && chown syslog:root /var/log/mail && \

My question is:
Where is this syslog user coming from?

Is this user always present in the original Ubuntu base image or is it (normally) added during one of the earlier Dockerfile instructions?

Thanks in advance

update:
changed the base image to this and the problem was solved.
FROM armv7/armhf-ubuntu:14.04

tomav commented

Yep, from Ubuntu image:

➜  ~ docker run --rm ubuntu:14.04 cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
daemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin
bin:x:2:2:bin:/bin:/usr/sbin/nologin
sys:x:3:3:sys:/dev:/usr/sbin/nologin
sync:x:4:65534:sync:/bin:/bin/sync
games:x:5:60:games:/usr/games:/usr/sbin/nologin
man:x:6:12:man:/var/cache/man:/usr/sbin/nologin
lp:x:7:7:lp:/var/spool/lpd:/usr/sbin/nologin
mail:x:8:8:mail:/var/mail:/usr/sbin/nologin
news:x:9:9:news:/var/spool/news:/usr/sbin/nologin
uucp:x:10:10:uucp:/var/spool/uucp:/usr/sbin/nologin
proxy:x:13:13:proxy:/bin:/usr/sbin/nologin
www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin
backup:x:34:34:backup:/var/backups:/usr/sbin/nologin
list:x:38:38:Mailing List Manager:/var/list:/usr/sbin/nologin
irc:x:39:39:ircd:/var/run/ircd:/usr/sbin/nologin
gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/usr/sbin/nologin
nobody:x:65534:65534:nobody:/nonexistent:/usr/sbin/nologin
libuuid:x:100:101::/var/lib/libuuid:
syslog:x:101:104::/home/syslog:/bin/false

@holyguacamole could you provide your Dockerfile for an rpi image? I wan't to run the mailserver on my pi 3

@eratio08 I'm currently not using the pi. The docker file is not the most recent one.
I think it is best to take the most recent ones and make the modifications yourself.
What you at least have to do is

  • replace the base image (see the update in the original post)
  • install filebeat from a different location .

@holyguacamole can you paste the line of configuration needed to change the installation to the named location? I can't figure out how to change it to fit the deb package format

This site has a description of how you can install it.

@eratio08 Forked the project and made some little changes (provided by @holyguacamole) in my fork https://github.com/MelkyPie/docker-mailserver
Should work for Raspberry Pi. Atleast I tested it. Any feedback is appreciated.

can't the above be merged into an armhf tag on dockerhub to make installing easier? Instead of having to manually roll it?

@cchance27 I left it on github as I probably won't have the time to constantly update it and here you can just update it manually. I will probably look into putting it onto dockerhub when I have the time but for now you will have to manually install it.

tomav commented

@cchance27 it's possible but this will have to be maintained.

ulm0 commented

@tomav could this be built using the resin/rpi-raspbian/? or it's mandatory to use ubuntu?

PS. I think I could maintain it

@klud1 probably you could change the image for rpi-raspbian from resin or something like that. I will try this because i want to run it on docker swarm cluster.

By the way, could be fine to have two dockerfiles to choose witch deploy that depends on your needs.

ulm0 commented

@albertoig I did try doing that, It kinda worked, problem is the elastic beats repo, it's not available for armhf. I did a workaround and tried to get those bins manually but only found one bin, 'cause on AMD64 Image it installs 2 bins, the beats one and a wrapper.

I'll do some more digging next week!

Hi,

Sorry for bringing this back up but I would like to use this image on my Odroid XU4 (armv7l) and the filebeat download link at https://beats-nightlies.s3.amazonaws.com/jenkins/filebeat/isn't valid anymore. In fact I was unable to find this package for armv7l anywhere. I briefly looked at the Dockerfile at it seems to me I could easily go without it. I am however unclear on what filebeat does and it's possible I didn't quite grasp how linked this package is to this docker image.

Is it safe to remove every mention of it from the Dockerfile ?