diff --git a/src/LiteCharmsSecurity.Admin.Api/Dockerfile b/src/LiteCharmsSecurity.Admin.Api/Dockerfile index bfeb5fa..34afa97 100644 --- a/src/LiteCharmsSecurity.Admin.Api/Dockerfile +++ b/src/LiteCharmsSecurity.Admin.Api/Dockerfile @@ -9,11 +9,8 @@ WORKDIR /app_source COPY . . -RUN --network=host dotnet restore "LiteCharmsSecurity.sln" --verbosity normal > /tmp/restore_error.log 2>&1 || true - -RUN cat /tmp/restore_error.log - -RUN if grep -q "error" /tmp/restore_error.log; then exit 1; fi +RUN --network=host dotnet restore "LiteCharmsSecurity.sln" > /tmp/error.txt 2>&1 || true +RUN export ERR_MSG=$(cat /tmp/error.txt | head -n 5) && false $ERR_MSG WORKDIR "/app_source/src/LiteCharmsSecurity.Admin.Api" RUN dotnet build "LiteCharmsSecurity.Admin.Api.csproj" -c Release -o /app/build diff --git a/src/LiteCharmsSecurity.Admin/Dockerfile b/src/LiteCharmsSecurity.Admin/Dockerfile index ae9b45e..d5790ee 100644 --- a/src/LiteCharmsSecurity.Admin/Dockerfile +++ b/src/LiteCharmsSecurity.Admin/Dockerfile @@ -18,11 +18,8 @@ RUN ln -s /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm \ COPY . . -RUN --network=host dotnet restore "LiteCharmsSecurity.sln" --verbosity normal > /tmp/restore_error.log 2>&1 || true - -RUN cat /tmp/restore_error.log - -RUN if grep -q "error" /tmp/restore_error.log; then exit 1; fi +RUN --network=host dotnet restore "LiteCharmsSecurity.sln" > /tmp/error.txt 2>&1 || true +RUN export ERR_MSG=$(cat /tmp/error.txt | head -n 5) && false $ERR_MSG WORKDIR "/app_source/src/LiteCharmsSecurity.Admin" RUN dotnet build "LiteCharmsSecurity.Admin.csproj" -c Release -o /app/build diff --git a/src/LiteCharmsSecurity.STS.Identity/Dockerfile b/src/LiteCharmsSecurity.STS.Identity/Dockerfile index 79334ba..8f08e67 100644 --- a/src/LiteCharmsSecurity.STS.Identity/Dockerfile +++ b/src/LiteCharmsSecurity.STS.Identity/Dockerfile @@ -9,11 +9,8 @@ WORKDIR /app_source COPY . . -RUN --network=host dotnet restore "LiteCharmsSecurity.sln" --verbosity normal > /tmp/restore_error.log 2>&1 || true - -RUN cat /tmp/restore_error.log - -RUN if grep -q "error" /tmp/restore_error.log; then exit 1; fi +RUN --network=host dotnet restore "LiteCharmsSecurity.sln" > /tmp/error.txt 2>&1 || true +RUN export ERR_MSG=$(cat /tmp/error.txt | head -n 5) && false $ERR_MSG WORKDIR "/app_source/src/LiteCharmsSecurity.STS.Identity" RUN dotnet build "LiteCharmsSecurity.STS.Identity.csproj" -c Release -o /app/build