/
Dockerfile
71 lines (54 loc) · 1.74 KB
/
Dockerfile
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
FROM arm32v7/ubuntu:xenial
LABEL io.resin.architecture="armv7hf" io.resin.qemu.version="2.9.0.resin1-arm"
ENV LC_ALL C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
COPY qemu-arm-static /usr/bin/
# Resin-xbuild
COPY resin-xbuild /usr/bin/
RUN ln -s resin-xbuild /usr/bin/cross-build-start \
&& ln -s resin-xbuild /usr/bin/cross-build-end
RUN apt-get update && apt-get install -y --no-install-recommends \
sudo \
ca-certificates \
findutils \
gnupg \
dirmngr \
inetutils-ping \
iproute \
netbase \
curl \
udev \
&& rm -rf /var/lib/apt/lists/*
# Tini
ENV TINI_VERSION 0.14.0
RUN curl -SLO "http://resin-packages.s3.amazonaws.com/tini/v$TINI_VERSION/tini0.14.0.linux-armv7hf.tar.gz" \
&& echo "cab86b2ad88ae6a3ef649293a5fecbc55bc31722cc8220f7b82bd6c960553e44 tini0.14.0.linux-armv7hf.tar.gz" | sha256sum -c - \
&& tar -xzf "tini0.14.0.linux-armv7hf.tar.gz" \
&& rm "tini0.14.0.linux-armv7hf.tar.gz" \
&& chmod +x tini \
&& mv tini /sbin/tini
COPY 01_nodoc /etc/dpkg/dpkg.cfg.d/
COPY 01_buildconfig /etc/apt/apt.conf.d/
RUN mkdir -p /usr/share/man/man1
# Install Systemd
RUN apt-get update && apt-get install -y --no-install-recommends \
systemd \
&& rm -rf /var/lib/apt/lists/*
ENV container docker
# We never want these to run in a container
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
COPY entry.sh /usr/bin/entry.sh
COPY launch.service /etc/systemd/system/launch.service
RUN systemctl enable /etc/systemd/system/launch.service
STOPSIGNAL 37
VOLUME ["/sys/fs/cgroup"]
ENTRYPOINT ["/usr/bin/entry.sh"]