Skip to content

Commit

Permalink
integration: download busybox-w32 from a Docker image
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Oct 14, 2022
1 parent ec3c08d commit 54f1519
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion contrib/busybox/Dockerfile
Expand Up @@ -12,14 +12,18 @@ ARG WINDOWS_BASE_IMAGE=mcr.microsoft.com/windows/servercore
ARG WINDOWS_BASE_IMAGE_TAG=ltsc2022
ARG BUSYBOX_VERSION=FRP-3329-gcf0fa4d13

# Busybox w32 binary from https://frippery.org/files/busybox/ available
# as a Docker image: https://github.com/crazy-max/docker-busybox-w32
FROM crazymax/busybox-w32:${BUSYBOX_VERSION} AS busybox

# Checksum taken from https://frippery.org/files/busybox/SHA256SUM
ARG BUSYBOX_SHA256SUM=bfaeb88638e580fc522a68e69072e305308f9747563e51fa085eec60ca39a5ae

FROM ${WINDOWS_BASE_IMAGE}:${WINDOWS_BASE_IMAGE_TAG}
RUN mkdir C:\tmp && mkdir C:\bin
ARG BUSYBOX_VERSION
ARG BUSYBOX_SHA256SUM
ADD https://frippery.org/files/busybox/busybox-w32-${BUSYBOX_VERSION}.exe /bin/busybox.exe
COPY --from=busybox /busybox.exe /bin/busybox.exe
RUN powershell \
if ((Get-FileHash -Path /bin/busybox.exe -Algorithm SHA256).Hash -ne $Env:BUSYBOX_SHA256SUM) { \
Throw \"Checksum validation failed\" \
Expand Down

0 comments on commit 54f1519

Please sign in to comment.