Merge branch 'sh-fix-postgresql-build' into 'master'

Fix PostgreSQL build errors

See merge request gitlab-org/gitlab-build-images!97
This commit is contained in:
Stan Hu 2018-05-26 22:27:08 +00:00
commit 7406c7b43a
3 changed files with 4 additions and 5 deletions

View file

@ -38,10 +38,8 @@ ARG GOLANG_DOWNLOAD_SHA256
RUN if [ -n "$INSTALL_GOLANG_VERSION" ] ; then /scripts/install-golang "${INSTALL_GOLANG_VERSION}" "${GOLANG_DOWNLOAD_SHA256}" && go version; fi
# Postgres
# Codedebt: currently this will only install the default version of postgres,
# not the stipulated version
ARG POSTGRES_VERSION
RUN if [ -n "$POSTGRES_VERSION" ] ; then /scripts/install-postgresql; fi
RUN if [ -n "$POSTGRES_VERSION" ] ; then /scripts/install-postgresql $POSTGRES_VERSION; fi
# Ansible
ARG ANSIBLE_VERSION

View file

@ -2,10 +2,11 @@
set -xeuo pipefail
IFS=$'\n\t'
POSTGRES_VERSION=${1:-9.6}
export DEBIAN_FRONTEND=noninteractive
curl -sS -L https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main" | tee /etc/apt/sources.list.d/postgresql.list
echo "deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg ${POSTGRES_VERSION}" | tee /etc/apt/sources.list.d/postgresql.list
apt-get update
apt-get install -y postgresql-client

View file

@ -9,7 +9,7 @@ apt-get update
apt-get install -yq --no-install-recommends \
make gcc g++ locales \
git-core pandoc texlive-latex-recommended texlive-xetex \
texlive-fonts-recommended lmodern ed file curl
texlive-fonts-recommended lmodern ed file curl gnupg2
apt-get autoremove -yq