intel-device-plugins-for-ku.../build/docker/lib/toybox_build.docker
Mikko Ylinen f0628ca7c0 images: update toybox to v0.8.11
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2024-04-23 18:17:15 +03:00

18 lines
893 B
Docker

ARG TOYBOX_VERSION="0.8.11"
ARG TOYBOX_SHA256="83a3a88cbe1fa30f099c2f58295baef4637aaf988085aaea56e03aa29168175d"
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"]
ARG FINAL_BASE=registry.access.redhat.com/ubi9-micro:latest
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-$(echo ${FINAL_BASE} | xargs basename -s :latest) LDFLAGS="--static" CC=musl-gcc PREFIX=$ROOT/usr/bin V=2 make toybox install_flat \N
&& install -D LICENSE $ROOT/licenses/toybox \N
&& cp -r /usr/share/doc/musl $ROOT/licenses/
###