summaryrefslogtreecommitdiff
path: root/build/postgres/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'build/postgres/Dockerfile')
-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