website/build/init/Dockerfile

22 lines
388 B
Text
Raw Normal View History

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