Run mail gateway in docker

Mar 4, 2019
11
0
1
38
Hi,
i was trying to run the mail gateway in a docker container. My Dockerfile looks like this (not complete):

Code:
FROM debian:buster

ENV DEBIAN_FRONTEND noninteractive

RUN set -ex; \
    \
    apt-get update; \
    apt-get install -y --no-install-recommends \
        wget \
        gnupg1 \
        bzip2 \
        busybox-static \
    ; \
    \
RUN set -ex; \
    \
    echo "postfix postfix/main_mailer_type string Satellite system" > postfixsettings.txt; \
    debconf-set-selections postfixsettings.txt; \
    apt-get install -q -y postfix; \
    wget http://download.proxmox.com/debian/proxmox-ve-release-6.x.gpg -O /etc/apt/trusted.gpg.d/proxmox-ve-release-6.x.gpg; \
    echo deb http://download.proxmox.com/debian/pmg buster pmg-no-subscription >> /etc/apt/sources.list; \
    apt-get update; \
    apt-get install -y \
        proxmox-mailgateway-container \
    ;\
    \
    rm -rf /var/lib/apt/lists/*

but i get this error:

Code:
setlogsock(): type='unix': path not available at /usr/share/perl5/PVE/SafeSyslog.pm line 38.
setlogsock(): type='unix': path not available at /usr/share/perl5/PVE/SafeSyslog.pm line 38.
generation pmg default locale
Generating locales (this might take a while)...
  en_US.UTF-8... done
Generation complete.
psql: could not connect to server: No such file or directory
        Is the server running locally and accepting
        connections on Unix domain socket "/var/run/postgresql/.s.PGSQL.5432"?
command 'psql -U postgres --list --quiet --tuples-only' failed: exit code 2
dpkg: error processing package pmg-api (--configure):
 installed pmg-api package post-installation script subprocess returned error exit status 2
dpkg: dependency problems prevent configuration of proxmox-mailgateway-container:
 proxmox-mailgateway-container depends on pmg-api; however:
  Package pmg-api is not configured yet.

dpkg: error processing package proxmox-mailgateway-container (--configure):
 dependency problems - leaving unconfigured
Processing triggers for systemd (241-7~deb10u2) ...
Processing triggers for mime-support (3.62) ...
Processing triggers for libc-bin (2.28-10) ...
Processing triggers for ca-certificates (20190110) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Errors were encountered while processing:
 pmg-api
 proxmox-mailgateway-container

Maybe someone can help me with this problem.
 
Sorry, but Proxmox Mail Gateway is not meant to be run inside Docker. Please use a real container (LXC) instead, or run inside a VM.
 
That's unfortunate. It looks like there is only a problem with the database connection. In future releases maybe you can separate installation and initialization. Then you can use a postgres container and connect it with the mail gateway container.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!