intel-device-plugins-for-ku.../build/docker/lib/toybox_build.docker
Tuomas Katila e9267e43c9 Improve dockerfiles based on feedback from hadolint
Co-authored-by: Mikko Ylinen <mikko.ylinen@intel.com>
Signed-off-by: Tuomas Katila <tuomas.katila@intel.com>
2022-10-14 08:22:57 +03:00

17 lines
769 B
Docker

ARG TOYBOX_VERSION="0.8.8"
ARG TOYBOX_SHA256="2bed6bb9edd5a249023103cf0402a835b0e53d10304a263f6f1e77a8aa49a898"
ARG ROOT=/install_root
RUN apt-get update && apt-get --no-install-recommends -y install musl musl-tools musl-dev
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -SL https://github.com/landley/toybox/archive/refs/tags/$TOYBOX_VERSION.tar.gz -o toybox.tar.gz \N
&& echo "$TOYBOX_SHA256 toybox.tar.gz" | sha256sum -c - \N
&& tar -xzf toybox.tar.gz \N
&& rm toybox.tar.gz \N
&& cd toybox-$TOYBOX_VERSION \N
&& KCONFIG_CONFIG=${DIR}/build/docker/toybox-config LDFLAGS="--static" CC=musl-gcc PREFIX=$ROOT V=2 make toybox install \N
&& install -D LICENSE $ROOT/licenses/toybox \N
&& cp -r /usr/share/doc/musl $ROOT/licenses/
###