this line is failing: postgresql-server-dev-${postgres_version}=$(postgres -V | awk '{print $3}')\* \ solution: I replace by postgresql-server-dev-all and add this line before the apt-get ENV DEBIAN_FRONTEND=noninteractive