summaryrefslogtreecommitdiff
path: root/build/postgres
diff options
context:
space:
mode:
authorFreya Murphy <freya@freyacat.org>2024-05-23 12:15:02 -0400
committerFreya Murphy <freya@freyacat.org>2024-05-23 12:15:02 -0400
commit17159879069c2e38e6415d152d35455f123ac674 (patch)
treef7107d1d3a416dc972b266029c8340c0a2266bbb /build/postgres
parentthings (diff)
downloadxssbook2-17159879069c2e38e6415d152d35455f123ac674.tar.gz
xssbook2-17159879069c2e38e6415d152d35455f123ac674.tar.bz2
xssbook2-17159879069c2e38e6415d152d35455f123ac674.zip
changes
Diffstat (limited to 'build/postgres')
-rw-r--r--build/postgres/Dockerfile17
1 files changed, 16 insertions, 1 deletions
diff --git a/build/postgres/Dockerfile b/build/postgres/Dockerfile
index 834fa89..32bca6e 100644
--- a/build/postgres/Dockerfile
+++ b/build/postgres/Dockerfile
@@ -1,6 +1,21 @@
FROM postgres:16-alpine
-RUN apk add --no-cache make git
+
+# 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