forked from openhab/openhabian
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.rpi2-installation
51 lines (39 loc) · 1.41 KB
/
Dockerfile.rpi2-installation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Assumes at least ARMv71 but not ARMv8 (aarch64) yet
FROM balenalib/raspberry-pi2-debian:buster-build
RUN [ "cross-build-start" ]
# Install Systemd
RUN apt-get update -qq && \
apt-get install --yes -qq --no-install-recommends systemd systemd-sysv apt-utils && \
rm -rf /var/lib/apt/lists/*
ENV container docker
ENV APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=DontWarn
ENV DOCKER=1
# We never want these to run in a container
# Feel free to edit the list but this is the one we used
RUN systemctl mask \
dev-hugepages.mount \
sys-fs-fuse-connections.mount \
sys-kernel-config.mount \
display-manager.service \
getty@.service \
systemd-logind.service \
systemd-remount-fs.service \
getty.target \
graphical.target \
kmod-static-nodes.service
COPY docker-tests/entry.sh /usr/bin/entry.sh
COPY docker-tests/resin.service /etc/systemd/system/resin.service
RUN systemctl enable /etc/systemd/system/resin.service
STOPSIGNAL 37
ENTRYPOINT ["/usr/bin/entry.sh"]
RUN git clone https://github.com/gdraheim/docker-systemctl-replacement && \
cp docker-systemctl-replacement/files/docker/systemctl3.py /bin/systemctl
RUN rm -f /sbin/runlevel
COPY docker-tests/runlevel /sbin/runlevel
RUN chmod 755 /sbin/runlevel
COPY . /opt/openhabian/
COPY build-image/openhabian.conf /etc/openhabian.conf
WORKDIR /opt/openhabian/
COPY docker-tests/start.sh ./
CMD ["bash", "start.sh"]
RUN [ "cross-build-end" ]