website/build/postgres/Dockerfile

22 lines
407 B
Docker
Raw Normal View History

2024-05-24 13:05:42 +00:00
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