xssbook2/build/init/Dockerfile
2024-05-23 12:15:02 -04:00

21 lines
388 B
Docker

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"]