blob: 32d0c7e30c4bee81043742ffc9a3e7ea311640ae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
ARG ALPINE_VERSION="3.23"
FROM postgres:16-alpine${ALPINE_VERSION}
# 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
# set perms
RUN chown -R postgres:postgres /var/run/postgresql
# fix workdir
WORKDIR /
USER postgres
|