2024-03-30 02:29:56 +00:00
|
|
|
FROM postgres:16-alpine
|
2024-05-23 16:15:02 +00:00
|
|
|
|
|
|
|
# install packages
|
|
|
|
RUN apk add --no-cache make git shadow
|
|
|
|
RUN rm -fr /var/cache/apk/*
|
|
|
|
|
|
|
|
# install pgjwt
|
2024-03-30 02:29:56 +00:00
|
|
|
RUN git clone https://github.com/michelp/pgjwt.git /tmp/pgjwt
|
|
|
|
WORKDIR /tmp/pgjwt
|
|
|
|
RUN make install
|
2024-05-23 16:15:02 +00:00
|
|
|
|
|
|
|
# update postgres user
|
|
|
|
RUN groupmod --gid 1000 postgres
|
|
|
|
RUN usermod --uid 1000 postgres
|
|
|
|
|
|
|
|
# remove build packages
|
|
|
|
RUN apk del make git shadow
|
|
|
|
|
|
|
|
# fix workdir
|
2024-03-30 02:29:56 +00:00
|
|
|
WORKDIR /
|
2024-05-23 16:15:02 +00:00
|
|
|
USER postgres
|