From 2b9e7ff0e5e99bd786e5e67943719069294ccb63 Mon Sep 17 00:00:00 2001 From: Gaardsholt Date: Mon, 8 Mar 2021 10:24:12 +0100 Subject: [PATCH] Will this fix microsoft's fails? --- barcoder/Controllers/HexController.cs | 2 +- barcoder/Dockerfile | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/barcoder/Controllers/HexController.cs b/barcoder/Controllers/HexController.cs index ae14415..79b6ca3 100644 --- a/barcoder/Controllers/HexController.cs +++ b/barcoder/Controllers/HexController.cs @@ -24,7 +24,7 @@ public IActionResult Get(string color, int width = 300, int height = 300) } catch (Exception e) { - return BadRequest($"'{color}' does not match any known color"); + return BadRequest($"'{color}' does not match any known color: {e.Message}"); } } diff --git a/barcoder/Dockerfile b/barcoder/Dockerfile index dc1e9f5..067e2df 100644 --- a/barcoder/Dockerfile +++ b/barcoder/Dockerfile @@ -9,6 +9,10 @@ RUN dotnet publish -c Release -o /app/ -r linux-x64 # build runtime image FROM mcr.microsoft.com/dotnet/aspnet:5.0 +RUN apt-get update \ + && apt-get install -y --no-install-recommends libgdiplus libc6-dev \ + && apt-get clean \ + && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY --from=builder /app . ENV ASPNETCORE_URLS http://*:5000