Work around bad hostname detection during postfix package install. (#9878)

pull/9986/head
Dan 3 years ago committed by GitHub
parent 19f7dcd000
commit 3d5ef519e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 12
      docker/prod/setup/preinstall-on-prem.sh

@ -2,6 +2,18 @@
set -e
set -o pipefail
# postfix.postinst tries to generate a hostname based on /etc/resolv.conf, which
# gets copied in to the docker environment from the host system. On systems
# that are not on a network with a domain, this will result in a failed install.
#
# See https://salsa.debian.org/postfix-team/postfix-dev/-/blob/debian/buster-updates/debian/postfix.postinst#L40
if [ -f /run/.containerenv -o -f /.dockerenv ]; then
mv /bin/hostname /bin/x-hostname
echo openproject.local > /etc/hostname
apt-get install -y postfix
mv /bin/x-hostname /bin/hostname
fi
apt-get install -y \
memcached \
postfix \

Loading…
Cancel
Save