diff --git a/Dockerfile b/Dockerfile
index 8d4154c1d6d36cc00013c1382506a2a08c0378a1..f955df566c2703e2932e2e840816aea02efbbccd 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -37,9 +37,14 @@ RUN addgroup --gid 1000 discourse \
       libxml2 \
       nodejs \
       optipng \
-      postgresql-client \
  && npm install svgo uglify-js@"<3" -g \
  && cd /tmp \
+ && curl -O https://get.enterprisedb.com/postgresql/postgresql-9.5.9-1-linux-x64-binaries.tar.gz \
+ && tar zxf postgresql-9.5.9-1-linux-x64-binaries.tar.gz \
+ && mv ./pgsql/bin/* /usr/local/bin/ \
+ && rm postgresql-9.5.9-1-linux-x64-binaries.tar.gz \
+ && rm -rf ./pgsql \
+ && cd /tmp \
  && curl -O http://www.lcdf.org/gifsicle/gifsicle-$GIFSICLE_VERSION.tar.gz \
  && tar zxf gifsicle-$GIFSICLE_VERSION.tar.gz \
  && cd gifsicle-$GIFSICLE_VERSION \