Permalink
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
85 lines (77 sloc) 2.26 KB
FROM arm32v7/debian:stretch-slim
LABEL io.balena.architecture="armv7hf"
LABEL io.balena.qemu.version="3.0.0+resin-arm"
COPY qemu-arm-static /usr/bin
RUN apt-get update && apt-get install -y --no-install-recommends \
sudo \
ca-certificates \
findutils \
gnupg \
dirmngr \
inetutils-ping \
netbase \
curl \
udev \
$( \
if apt-cache show 'iproute' 2>/dev/null | grep -q '^Version:'; then \
echo 'iproute'; \
else \
echo 'iproute2'; \
fi \
) \
&& rm -rf /var/lib/apt/lists/* \
&& echo '#!/bin/sh\n\
set -e\n\
set -u\n\
export DEBIAN_FRONTEND=noninteractive\n\
n=0\n\
max=2\n\
until [ $n -gt $max ]; do\n\
set +e\n\
(\n\
apt-get update -qq &&\n\
apt-get install -y --no-install-recommends "$@"\n\
)\n\
CODE=$?\n\
set -e\n\
if [ $CODE -eq 0 ]; then\n\
break\n\
fi\n\
if [ $n -eq $max ]; then\n\
exit $CODE\n\
fi\n\
echo "apt failed, retrying"\n\
n=$(($n + 1))\n\
done\n\
rm -r /var/lib/apt/lists/*' > /usr/sbin/install_packages \
&& chmod 0755 "/usr/sbin/install_packages"
RUN curl -SLO "http://resin-packages.s3.amazonaws.com/resin-xbuild/v1.0.0/resin-xbuild1.0.0.tar.gz" \
&& echo "1eb099bc3176ed078aa93bd5852dbab9219738d16434c87fc9af499368423437 resin-xbuild1.0.0.tar.gz" | sha256sum -c - \
&& tar -xzf "resin-xbuild1.0.0.tar.gz" \
&& rm "resin-xbuild1.0.0.tar.gz" \
&& chmod +x resin-xbuild \
&& mv resin-xbuild /usr/bin \
&& ln -s resin-xbuild /usr/bin/cross-build-start \
&& ln -s resin-xbuild /usr/bin/cross-build-end
ENV LC_ALL C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
ENV UDEV off
# 01_nodoc
RUN echo 'path-exclude /usr/share/doc/*\n\
# we need to keep copyright files for legal reasons\n\
path-include /usr/share/doc/*/copyright\n\
path-exclude /usr/share/man/*\n\
path-exclude /usr/share/groff/*\n\
path-exclude /usr/share/info/*\n\
path-exclude /usr/share/lintian/*\n\
path-exclude /usr/share/linda/*\n\
path-exclude /usr/share/locale/*\n\
path-include /usr/share/locale/en*' > /etc/dpkg/dpkg.cfg.d/01_nodoc
# 01_buildconfig
RUN echo 'APT::Get::Assume-Yes "true";\n\
APT::Install-Recommends "0";\n\
APT::Install-Suggests "0";\n\
quiet "true";' > /etc/apt/apt.conf.d/01_buildconfig
RUN mkdir -p /usr/share/man/man1
COPY entry.sh /usr/bin/entry.sh
ENTRYPOINT ["/usr/bin/entry.sh"]