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
+1 -1
View File
@@ -47,7 +47,7 @@ build_task:
#script: #script:
## https://cirrus-ci.org/guide/writing-tasks/#artifacts-instruction ## https://cirrus-ci.org/guide/writing-tasks/#artifacts-instruction
#- wget https://api.cirrus-ci.com/v1/artifact/github/$CIRRUS_REPO_FULL_NAME/build/binaries/bin/postgrest #- wget https://api.cirrus-ci.com/v1/artifact/github/$CIRRUS_REPO_FULL_NAME/build/binaries/bin/postgrest
#- tar cjf postgrest-$CIRRUS_TAG-freebsd.tar.xz postgrest #- tar cvJf postgrest-$CIRRUS_TAG-freebsd.tar.xz -C ~/project/result/bin postgrest
### The CIRRUS_RELEASE env var is not the same as the tag. It's an id for the release. ### The CIRRUS_RELEASE env var is not the same as the tag. It's an id for the release.
#- curl -X POST --data-binary @$NAME \ #- curl -X POST --data-binary @$NAME \
#-H "Authorization:token ${TOKEN}" \ #-H "Authorization:token ${TOKEN}" \
+3 -9
View File
@@ -1,23 +1,18 @@
# To build use: # To build use:
# docker build --build-arg POSTGREST_VERSION=<v5.2.0 or another version> -t postgrest ./docker/ # 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 FROM debian:buster-slim
ARG POSTGREST_VERSION 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 # Install postgrest
RUN BUILD_DEPS="curl ca-certificates xz-utils" && \ RUN BUILD_DEPS="curl ca-certificates xz-utils" && \
apt-get -qq update && \ apt-get -qq update && \
apt-get -qq install -y --no-install-recommends $BUILD_DEPS && \ apt-get -qq install -y --no-install-recommends $BUILD_DEPS && \
cd /tmp && \ cd /tmp && \
curl -SLO https://github.com/PostgREST/postgrest/releases/download/${POSTGREST_VERSION}/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}-ubuntu.tar.xz && \ tar -xJvf postgrest-${POSTGREST_VERSION}-linux-x64-static.tar.xz && \
mv postgrest /usr/local/bin/postgrest && \ mv postgrest /usr/local/bin/postgrest && \
cd / && \ cd / && \
apt-get -qq purge --auto-remove -y $BUILD_DEPS && \ 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 COPY postgrest.conf /etc/postgrest.conf
ENV PGRST_DB_URI= \ ENV PGRST_DB_URI= \
PGRST_DB_SCHEMA=public \ PGRST_DB_SCHEMA=public \
PGRST_DB_ANON_ROLE= \ PGRST_DB_ANON_ROLE= \