Skip to content
Permalink
master
Switch branches/tags
Go to file
 
 
Cannot retrieve contributors at this time
FROM arm32v7/debian:stretch-slim
LABEL io.balena.architecture="armv7hf"
LABEL io.balena.qemu.version="5.2.0+balena4-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 \
procps \
$( \
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 -rf /var/cache/apt/archives/* /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 -sf resin-xbuild /usr/bin/cross-build-start \
&& ln -sf 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
COPY balena-info /usr/bin/balena-info
COPY balena-idle /usr/bin/balena-idle
ENTRYPOINT ["/usr/bin/entry.sh"]
RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/a95300eda2320833e537ca20d728a870bf02177d/scripts/assets/tests/test-os.sh" \
&& echo "Running test-os" \
&& chmod +x test-os.sh \
&& bash test-os.sh debian stretch \
&& rm -rf test-os.sh
RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo 'Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/): \nArchitecture: ARM v7 \nOS: Debian Stretch \nVariant: run variant \nDefault variable(s): UDEV=off \nExtra features: \n- Easy way to install packages with `install_packages <package-name>` command \n- Run anywhere with cross-build feature (for ARM only) \n- Keep the container idling with `balena-idle` command \n- Show base image details with `balena-info` command' > /.balena/messages/image-info
RUN echo '#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
&& chmod +x /bin/sh-shim \
&& cp /bin/sh /bin/sh.real \
&& mv /bin/sh-shim /bin/sh