summaryrefslogtreecommitdiff
path: root/build/init/Dockerfile
blob: 98eb285ecaed53a9870d6a08165fd6fadfa7538b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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"]