Postfix
Postfix 未在 gitlab docker 容器中啟動
我試圖讓後綴在 gitlab/gitlab-ce:9.3.6-ce.0 docker 容器上執行,但它似乎無法啟動
我收到以下錯誤:
postfix start postfix/postfix-script: starting the Postfix mail system postfix/postfix-script: fatal: mail system startup failed
我的配置看起來像:
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no compatibility_level = 2 inet_interfaces = all inet_protocols = all mailbox_size_limit = 0 mydestination = $myhostname, ipayroll.co.nz, ip-10-136-28-218.ap- southeast-2.compute.internal, localhost.ap-southeast-2.compute.internal, localhost myhostname = ip-10-136-28-218.ap-southeast-2.compute.internal mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname readme_directory = no recipient_delimiter = + relayhost = smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes
這是圖像的作業系統:
NAME="Ubuntu" VERSION="16.04.2 LTS (Xenial Xerus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04.2 LTS" VERSION_ID="16.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" VERSION_CODENAME=xenial UBUNTU_CODENAME=xenial
我相信這是容器的問題,因為我之前在其他容器上安裝了 postfix。我只是無法弄清楚這一點。我嘗試了許多安裝 postfix 的方法,但這是我使用的一般方法。
apt-get update && apt-get install postfix
這裡的問題是我使用錯誤的 shell 執行命令,我使用的是 /bin/bash 而不是 /bin/sh。一旦我嘗試通過 dockerfile 執行此操作並通過入口點開始,一切順利。