github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/contrib/busybox/Dockerfile (about)

     1  # Source: https://frippery.org/busybox/
     2  # This Dockerfile builds a (32-bit) busybox images which is suitable for
     3  # running many of the integration-cli tests for Docker against a Windows
     4  # daemon. It will not run on nanoserver as that is 64-bit only.
     5  #
     6  # Based on https://github.com/jhowardmsft/busybox
     7  # John Howard (IRC jhowardmsft, Email john.howard@microsoft.com)
     8  #
     9  # To build: docker build -t busybox .
    10  # To publish: Needs someone with publishing rights
    11  ARG WINDOWS_BASE_IMAGE=mcr.microsoft.com/windows/servercore
    12  ARG WINDOWS_BASE_IMAGE_TAG=ltsc2019
    13  ARG BUSYBOX_VERSION=FRP-3329-gcf0fa4d13
    14  
    15  # Checksum taken from https://frippery.org/files/busybox/SHA256SUM
    16  ARG BUSYBOX_SHA256SUM=bfaeb88638e580fc522a68e69072e305308f9747563e51fa085eec60ca39a5ae
    17  
    18  FROM ${WINDOWS_BASE_IMAGE}:${WINDOWS_BASE_IMAGE_TAG}
    19  RUN mkdir C:\tmp && mkdir C:\bin
    20  ARG BUSYBOX_VERSION
    21  ARG BUSYBOX_SHA256SUM
    22  ADD https://frippery.org/files/busybox/busybox-w32-${BUSYBOX_VERSION}.exe /bin/busybox.exe
    23  RUN powershell \
    24      if ((Get-FileHash -Path /bin/busybox.exe -Algorithm SHA256).Hash -ne $Env:BUSYBOX_SHA256SUM) { \
    25          Throw \"Checksum validation failed\" \
    26      }
    27  
    28  RUN setx /M PATH "C:\bin;%PATH%"
    29  RUN powershell busybox.exe --list ^|%{$nul = cmd /c mklink C:\bin\$_.exe busybox.exe}
    30  CMD ["sh"]