summaryrefslogtreecommitdiff
path: root/build/postgres
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-05-24 09:05:42 -0400
committerFreya Murphy <freya@freyacat.org>2024-05-24 09:05:42 -0400
commitc5f39ea2cd7cf02246705ea8872d3b350526165c (patch)
tree2694f9fdc5d83b529a01f2997c1d89c271c86592 /build/postgres
downloadwebsite-c5f39ea2cd7cf02246705ea8872d3b350526165c.tar.gz
website-c5f39ea2cd7cf02246705ea8872d3b350526165c.tar.bz2
website-c5f39ea2cd7cf02246705ea8872d3b350526165c.zip
initial
Diffstat (limited to 'build/postgres')
-rw-r--r--build/postgres/Dockerfile21
1 files changed, 21 insertions, 0 deletions
diff --git a/build/postgres/Dockerfile b/build/postgres/Dockerfile
new file mode 100644
index 0000000..32bca6e
--- /dev/null
+++ b/build/postgres/Dockerfile
@@ -0,0 +1,21 @@
+FROM postgres:16-alpine
+
+# install packages
+RUN apk add --no-cache make git shadow
+RUN rm -fr /var/cache/apk/*
+
+# install pgjwt
+RUN git clone https://github.com/michelp/pgjwt.git /tmp/pgjwt
+WORKDIR /tmp/pgjwt
+RUN make install
+
+# update postgres user
+RUN groupmod --gid 1000 postgres
+RUN usermod --uid 1000 postgres
+
+# remove build packages
+RUN apk del make git shadow
+
+# fix workdir
+WORKDIR /
+USER postgres