diff --git a/src/GZCTF/Dockerfile b/src/GZCTF/Dockerfile index a625a8bf5..5118764fa 100644 --- a/src/GZCTF/Dockerfile +++ b/src/GZCTF/Dockerfile @@ -4,15 +4,24 @@ COPY publish /build RUN cp -r /build/${TARGETPLATFORM} /publish FROM mcr.microsoft.com/dotnet/aspnet:10.0-alpine AS final +ARG TARGETPLATFORM ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ LC_ALL=en_US.UTF-8 WORKDIR /app RUN apk add --update --no-cache wget libpcap icu-data-full icu-libs \ - ca-certificates libgdiplus tzdata krb5-libs && \ + ca-certificates libgdiplus tzdata krb5-libs zip unzip && \ update-ca-certificates +RUN ARCH=$(echo ${TARGETPLATFORM} | cut -d'/' -f2) && \ + if [ "$ARCH" = "amd64" ]; then ARCH="x64"; fi && \ + wget https://github.com/hez2010/Satori/releases/latest/download/linux_musl_${ARCH}.zip && \ + unzip linux_musl_${ARCH}.zip -d satori && \ + chmod +x satori/* && \ + mv satori/* /usr/share/dotnet/shared/Microsoft.NETCore.App/$(ls /usr/share/dotnet/shared/Microsoft.NETCore.App)/ && \ + rm linux_musl_${ARCH}.zip && rm -rf satori + COPY --from=build --chown=$APP_UID:$APP_UID /publish . EXPOSE 8080