summaryrefslogtreecommitdiff
path: root/build/init/Dockerfile
blob: cd2af92f05d4f0556e27236c7a3ad6d1a6aba9b5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM alpine:latest

# install packages
RUN apk add --no-cache tini shadow coreutils findutils
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
COPY ./stamp.sh /usr/local/bin/stamp.sh

# remove build packages
RUN apk del shadow

# do the
USER init
ENTRYPOINT ["/sbin/tini", "--"]
CMD ["/usr/local/bin/init"]