22 lines
388 B
Text
22 lines
388 B
Text
|
FROM alpine:3.19
|
||
|
|
||
|
# install packages
|
||
|
RUN apk add --no-cache postgresql16-client tini shadow
|
||
|
RUN rm -fr /var/cache/apk/*
|
||
|
|
||
|
# setup main user
|
||
|
RUN adduser -D init
|
||
|
RUN groupmod --gid 1000 init
|
||
|
RUN usermod --uid 1000 init
|
||
|
|
||
|
# copy scripts
|
||
|
COPY ./init /usr/local/bin/init
|
||
|
|
||
|
# remove build packages
|
||
|
RUN apk del shadow
|
||
|
|
||
|
# do the
|
||
|
USER init
|
||
|
ENTRYPOINT ["/sbin/tini", "--"]
|
||
|
CMD ["/usr/local/bin/init"]
|