summaryrefslogtreecommitdiff
path: root/openrc/Dockerfile
blob: 49f32cbbd0fc24a07e79a92c91811af3c486d502 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM alpine:3.21

# install packages
RUN apk add --no-cache openrc udev-init-scripts-openrc

# setup openrc
COPY ./wait.initd /etc/init.d/wait
RUN sed -i 's/#rc_sys=""/rc_sys="docker"/' /etc/rc.conf && \
  rc-update add wait

# remove last run
RUN rm -rf /run/openrc 2>/dev/null
RUN mkdir /run/openrc
RUN touch /run/openrc/softlevel

# start openrc
COPY ./entrypoint.sh /sbin/entrypoint
ENTRYPOINT ["/sbin/entrypoint"]