Skip to content

Commit

Permalink
Work around bad hostname detection during postfix package install. (o…
Browse files Browse the repository at this point in the history
  • Loading branch information
drmoose authored Dec 14, 2021
1 parent 19f7dcd commit 3d5ef51
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docker/prod/setup/preinstall-on-prem.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 3d5ef51

Please sign in to comment.