diff options
author | Freya Murphy <freya@freyacat.org> | 2024-12-23 10:39:16 -0500 |
---|---|---|
committer | Freya Murphy <freya@freyacat.org> | 2024-12-23 10:39:16 -0500 |
commit | de9cae795f93d03e68d965c59af4b21d96df4ec7 (patch) | |
tree | ad4f903c04630b3b92e2b9b5d06d5b8647d299bb /build/postgrest/Dockerfile | |
parent | license (diff) | |
download | crimson-de9cae795f93d03e68d965c59af4b21d96df4ec7.tar.gz crimson-de9cae795f93d03e68d965c59af4b21d96df4ec7.tar.bz2 crimson-de9cae795f93d03e68d965c59af4b21d96df4ec7.zip |
initial
Diffstat (limited to 'build/postgrest/Dockerfile')
-rw-r--r-- | build/postgrest/Dockerfile | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/build/postgrest/Dockerfile b/build/postgrest/Dockerfile new file mode 100644 index 0000000..747052f --- /dev/null +++ b/build/postgrest/Dockerfile @@ -0,0 +1,30 @@ +FROM alpine:latest + +# install packages +RUN apk add --no-cache tini wget curl shadow +RUN rm -fr /var/cache/apk/* + +# setup main user +RUN adduser -D postgrest +RUN groupmod --gid 1000 postgrest +RUN usermod --uid 1000 postgrest + +# install postgrest +RUN wget "https://github.com/PostgREST/postgrest/releases/download/v12.2.3/postgrest-v12.2.3-linux-static-x64.tar.xz" -O /tmp/postgrest.tar.xz +RUN tar xJf /tmp/postgrest.tar.xz -C /usr/local/bin +RUN rm /tmp/postgrest.tar.xz + +# copy scripts +COPY ./entrypoint.sh /usr/local/bin/entrypoint.sh + +# remove build packages +RUN apk del shadow + +# make the dirs +RUN mkdir -p /etc/postgrest.d && \ + chown postgrest:postgrest /etc/postgrest.d + +# do the +USER postgrest +ENTRYPOINT ["/sbin/tini", "--"] +CMD ["/usr/local/bin/entrypoint.sh"] |