Skip to content

Commit

Permalink
Fix Dockerfile
Browse files Browse the repository at this point in the history
Remove libpq5 dependency since static bin already contains it.
  • Loading branch information
steve-chavez committed May 18, 2020
1 parent d6050c8 commit 222a530
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ build_task:
#script:
## 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
#- 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.
#- curl -X POST --data-binary @$NAME \
#-H "Authorization:token ${TOKEN}" \
Expand Down
12 changes: 3 additions & 9 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -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 && \
Expand All @@ -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= \
Expand Down

0 comments on commit 222a530

Please sign in to comment.