chore(docker): Fix .NET missing error

Reason: The docker image avoided using the upstream `dotnet/runtime`
image to save on image size. Total image size without it was under 50MB.
By using the upstream image, image size goes up to about 120MB.

The maintainability cost of avoiding the upstream image isn't worth it.
It's also error prone, which is why this bug happened.

The solution is to just use the upstream runtime image. Total image size
goes up but it's more robust.

Fixes #147.
pull/151/head
Robert Dailey 2 years ago
parent 53d7233b1e
commit 06600c9a51

@ -11,19 +11,15 @@ COPY ./artifacts ./artifacts
RUN ./build.sh
#############################################################################
FROM alpine AS final
FROM mcr.microsoft.com/dotnet/runtime:7.0-alpine AS final
# Required by environment and/or dotnet
ENV PATH="${PATH}:/app/recyclarr" \
RECYCLARR_APP_DATA=/config \
CRON_SCHEDULE="@daily" \
DOTNET_BUNDLE_EXTRACT_BASE_DIR=/tmp/.net \
# The GLOBALIZATION variable is so that we do not need libicu installed (saves us ~40MB).
DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true
CRON_SCHEDULE="@daily"
RUN set -ex; \
apk add --no-cache bash libstdc++ tzdata supercronic git; \
mkdir -p "$DOTNET_BUNDLE_EXTRACT_BASE_DIR" && chmod 777 "$DOTNET_BUNDLE_EXTRACT_BASE_DIR"; \
apk add --no-cache bash tzdata supercronic git; \
mkdir -p /config && chown 1000:1000 /config;
COPY --from=build /build/publish /app/recyclarr/

Loading…
Cancel
Save