diff --git a/.github/workflows/release-backend.yaml b/.github/workflows/release-backend.yaml new file mode 100644 index 00000000..f1e22626 --- /dev/null +++ b/.github/workflows/release-backend.yaml @@ -0,0 +1,15 @@ +on: + push: + tags: + - ccdscan/* + +jobs: + release-base-image: + uses: concordium/.github/.github/workflows/docker-release-workflow.yaml@v1 + with: + SERVICE_NAME: "ccdscan" + BUILD_ARGS: | + DOTNET_VERSION=6.0 + DOCKER_FILE_PATH: backend/Dockerfile + DOCKER_CONTEXT: backend + secrets: inherit diff --git a/backend/Dockerfile b/backend/Dockerfile index c108e7ef..4cf5582f 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,8 +1,9 @@ -FROM mcr.microsoft.com/dotnet/aspnet:6.0-bookworm-slim AS base +ARG DOTNET_VERSION +FROM mcr.microsoft.com/dotnet/aspnet:${DOTNET_VERSION}-bookworm-slim AS base WORKDIR /app EXPOSE 5000 -FROM mcr.microsoft.com/dotnet/sdk:6.0-bookworm-slim AS publish +FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION}-bookworm-slim AS publish RUN apt-get update && apt-get install -y build-essential # Installing Rust to build Concordium.Sdk. RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain 1.80 --profile minimal -y @@ -16,5 +17,6 @@ FROM base AS final RUN apt-get update && apt-get install ca-certificates && rm -rf /var/lib/apt/lists/* WORKDIR /app COPY --from=publish /app/publish . +LABEL dotnet_version=${DOTNET_VERSION} ENV ASPNETCORE_URLS=http://+:5000 ENTRYPOINT ["dotnet", "Application.dll"]