2024-03-30 02:29:56 +00:00
|
|
|
FROM alpine:3.19
|
2024-05-23 16:15:02 +00:00
|
|
|
|
|
|
|
# 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
|
2024-05-20 21:11:38 +00:00
|
|
|
COPY ./init /usr/local/bin/init
|
2024-05-23 16:15:02 +00:00
|
|
|
|
|
|
|
# remove build packages
|
|
|
|
RUN apk del shadow
|
|
|
|
|
|
|
|
# do the
|
|
|
|
USER init
|
2024-03-30 02:29:56 +00:00
|
|
|
ENTRYPOINT ["/sbin/tini", "--"]
|
2024-05-20 21:11:38 +00:00
|
|
|
CMD ["/usr/local/bin/init"]
|