xssbook2/build/init/Dockerfile

22 lines
388 B
Text
Raw Normal View History

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
ENTRYPOINT ["/sbin/tini", "--"]
2024-05-20 21:11:38 +00:00
CMD ["/usr/local/bin/init"]