Fix Dockerfile

Remove libpq5 dependency since static bin already contains it.
This commit is contained in:
steve-chavez
2020-05-18 16:50:53 -05:00
parent d6050c8615
commit 222a53015e
2 changed files with 4 additions and 10 deletions
+3 -9
View File
@@ -1,23 +1,18 @@
# To build use:
# docker build --build-arg POSTGREST_VERSION=<v5.2.0 or another version> -t postgrest ./docker/
# docker build --build-arg POSTGREST_VERSION=v7.0.1 -t postgrest ./docker/
FROM debian:buster-slim
ARG POSTGREST_VERSION
# Install libpq5
RUN apt-get -qq update && \
apt-get -qq install -y --no-install-recommends libpq5 && \
apt-get -qq clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Install postgrest
RUN BUILD_DEPS="curl ca-certificates xz-utils" && \
apt-get -qq update && \
apt-get -qq install -y --no-install-recommends $BUILD_DEPS && \
cd /tmp && \
curl -SLO https://github.com/PostgREST/postgrest/releases/download/${POSTGREST_VERSION}/postgrest-${POSTGREST_VERSION}-ubuntu.tar.xz && \
tar -xJvf postgrest-${POSTGREST_VERSION}-ubuntu.tar.xz && \
curl -SLO https://github.com/PostgREST/postgrest/releases/download/${POSTGREST_VERSION}/postgrest-${POSTGREST_VERSION}-linux-x64-static.tar.xz && \
tar -xJvf postgrest-${POSTGREST_VERSION}-linux-x64-static.tar.xz && \
mv postgrest /usr/local/bin/postgrest && \
cd / && \
apt-get -qq purge --auto-remove -y $BUILD_DEPS && \
@@ -26,7 +21,6 @@ RUN BUILD_DEPS="curl ca-certificates xz-utils" && \
COPY postgrest.conf /etc/postgrest.conf
ENV PGRST_DB_URI= \
PGRST_DB_SCHEMA=public \
PGRST_DB_ANON_ROLE= \