From 6c241bbee88ae6baaa2434894ba6973adf3fff01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20W=C3=A4scher?= Date: Sun, 19 May 2024 10:48:30 +0200 Subject: [PATCH 1/3] Update ci.yml --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bb25778..a9bd9ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,7 @@ jobs: run: dotnet test --no-build --configuration=Release --verbosity normal - name: Build the Docker image - run: docker build . --file Dockerfile --tag awaescher/maxpower:${{steps.gitversion.outputs.semVer}} --tag awaescher/maxpower:latest --build-arg SEMVERSION=${{steps.gitversion.outputs.semVer}} + run: docker build . --file Dockerfile --tag awaescher/maxpower:${{steps.gitversion.outputs.semVer}} --tag awaescher/maxpower:latest --build-arg SEMVERSION=${{steps.gitversion.outputs.FullSemVer}} --build-arg ASSEMBLYSEMVERSION=${{steps.gitversion.outputs.AssemblySemVer}} - name: Log in to Docker Hub uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a From 95276bf7f0868c900671d436f3f7e1f737ebc111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20W=C3=A4scher?= Date: Sun, 19 May 2024 10:50:06 +0200 Subject: [PATCH 2/3] Update Dockerfile --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f642955..320919d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ WORKDIR / COPY ./MaxPower /app/MaxPower/ COPY ./MaxTalkSharp /app/MaxTalkSharp/ WORKDIR /app/MaxPower/ -RUN dotnet publish -c Release -r linux-arm64 -o out -p:PublishSingleFile=true --self-contained true /p:AssemblyVersion=$SEMVERSION /p:Version=$SEMVERSION +RUN dotnet publish -c Release -r linux-arm64 -o out -p:PublishSingleFile=true --self-contained true /p:AssemblyVersion=$ASSEMBLYSEMVERSION /p:Version=$SEMVERSION # RUNTIME CONTAINER FROM mcr.microsoft.com/dotnet/aspnet:8.0.2-jammy-arm64v8 AS runtime @@ -24,4 +24,4 @@ EXPOSE 80 WORKDIR /app COPY --from=build /app/MaxPower/out ./ #RUN rm /app/appsettings.Development.json -ENTRYPOINT ["./MaxPower", ""] \ No newline at end of file +ENTRYPOINT ["./MaxPower", ""] From aebeffb3d7ad660b92bc28ea74fa678d322c660c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20W=C3=A4scher?= Date: Sun, 19 May 2024 10:51:52 +0200 Subject: [PATCH 3/3] Update Dockerfile --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 320919d..98ab389 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,7 @@ FROM mcr.microsoft.com/dotnet/sdk:8.0.101 AS build WORKDIR / +ARG ASSEMBLYSEMVERSION ARG SEMVERSION # copy csproj and restore as distinct layers