diff --git a/.github/workflows/docker-teamcityagent-image.yml b/.github/workflows/docker-teamcityagent-image.yml index 1618d56..7f3adba 100644 --- a/.github/workflows/docker-teamcityagent-image.yml +++ b/.github/workflows/docker-teamcityagent-image.yml @@ -113,15 +113,15 @@ jobs: # Write-Output "aspnet=$($dotnet_vers[1])" >> $env:GITHUB_OUTPUT # Write-Output "dotnet=$($dotnet_vers[2])" >> $env:GITHUB_OUTPUT - #- name: Get .NET 6.0 Versions - # id: dotnet6_vers - # shell: pwsh - # run: | - # $dotnet_vers=$(docker run --rm mcr.microsoft.com/dotnet/sdk:6.0-focal sh -c 'echo $DOTNET_SDK_VERSION;echo $ASPNET_VERSION;echo $DOTNET_VERSION') - # Write-Output "Version SDK:$($dotnet_vers[0]) ASP.NET:$($dotnet_vers[1]) .NETCore:$($dotnet_vers[2])" - # Write-Output "sdk=$($dotnet_vers[0])" >> $env:GITHUB_OUTPUT - # Write-Output "aspnet=$($dotnet_vers[1])" >> $env:GITHUB_OUTPUT - # Write-Output "dotnet=$($dotnet_vers[2])" >> $env:GITHUB_OUTPUT + - name: Get .NET 6.0 Versions + id: dotnet6_vers + shell: pwsh + run: | + $dotnet_vers=$(docker run --rm mcr.microsoft.com/dotnet/sdk:6.0-focal sh -c 'echo $DOTNET_SDK_VERSION;echo $ASPNET_VERSION;echo $DOTNET_VERSION') + Write-Output "Version SDK:$($dotnet_vers[0]) ASP.NET:$($dotnet_vers[1]) .NETCore:$($dotnet_vers[2])" + Write-Output "sdk=$($dotnet_vers[0])" >> $env:GITHUB_OUTPUT + Write-Output "aspnet=$($dotnet_vers[1])" >> $env:GITHUB_OUTPUT + Write-Output "dotnet=$($dotnet_vers[2])" >> $env:GITHUB_OUTPUT - name: Get .NET 7.0 Versions id: dotnet7_vers @@ -166,6 +166,9 @@ jobs: build-args: | MINVER_VERSION=${{ steps.minver_version.outputs.version }} DOCKER_COMPOSE_VERSION=${{ steps.docker_compose_version.outputs.version }} + DOTNET_SDK_VERSION6=${{ steps.dotnet6_vers.outputs.sdk }} + ASPNET_VERSION6=${{ steps.dotnet6_vers.outputs.aspnet }} + DOTNET_VERSION6=${{ steps.dotnet6_vers.outputs.dotnet }} DOTNET_SDK_VERSION7=${{ steps.dotnet7_vers.outputs.sdk }} ASPNET_VERSION7=${{ steps.dotnet7_vers.outputs.aspnet }} DOTNET_VERSION7=${{ steps.dotnet7_vers.outputs.dotnet }} @@ -183,9 +186,6 @@ jobs: DOTNET_SDK_VERSION5=${{ steps.dotnet5_vers.outputs.sdk }} ASPNET_VERSION5=${{ steps.dotnet5_vers.outputs.aspnet }} DOTNET_VERSION5=${{ steps.dotnet5_vers.outputs.dotnet }} - DOTNET_SDK_VERSION6=${{ steps.dotnet6_vers.outputs.sdk }} - ASPNET_VERSION6=${{ steps.dotnet6_vers.outputs.aspnet }} - DOTNET_VERSION6=${{ steps.dotnet6_vers.outputs.dotnet }} - name: Image digest run: echo ${{ steps.docker_build.outputs.digest }} diff --git a/docker-build.ps1 b/docker-build.ps1 index 49ccb79..38fbcc8 100644 --- a/docker-build.ps1 +++ b/docker-build.ps1 @@ -101,11 +101,11 @@ private:AddBuildArg 'DOCKER_COMPOSE_VERSION' $docker_compose_version #private:AddBuildArg 'ASPNET_VERSION5' $dotnet_vers[1] #private:AddBuildArg 'DOTNET_VERSION5' $dotnet_vers[2] -#$dotnet_vers = $(docker run --rm mcr.microsoft.com/dotnet/sdk:6.0-focal sh -c 'echo $DOTNET_SDK_VERSION;echo $ASPNET_VERSION;echo $DOTNET_VERSION') -#Write-Output ".NET 6.0: Version SDK:$($dotnet_vers[0]) ASP.NET:$($dotnet_vers[1]) .NETCore:$($dotnet_vers[2])" -#private:AddBuildArg 'DOTNET_SDK_VERSION6' $dotnet_vers[0] -#private:AddBuildArg 'ASPNET_VERSION6' $dotnet_vers[1] -#private:AddBuildArg 'DOTNET_VERSION6' $dotnet_vers[2] +$dotnet_vers = $(docker run --rm mcr.microsoft.com/dotnet/sdk:6.0-focal sh -c 'echo $DOTNET_SDK_VERSION;echo $ASPNET_VERSION;echo $DOTNET_VERSION') +Write-Output ".NET 6.0: Version SDK:$($dotnet_vers[0]) ASP.NET:$($dotnet_vers[1]) .NETCore:$($dotnet_vers[2])" +private:AddBuildArg 'DOTNET_SDK_VERSION6' $dotnet_vers[0] +private:AddBuildArg 'ASPNET_VERSION6' $dotnet_vers[1] +private:AddBuildArg 'DOTNET_VERSION6' $dotnet_vers[2] $dotnet_vers = $(docker run --rm mcr.microsoft.com/dotnet/sdk:7.0-jammy sh -c 'echo $DOTNET_SDK_VERSION;echo $ASPNET_VERSION;echo $DOTNET_VERSION') Write-Output ".NET 7.0: Version SDK:$($dotnet_vers[0]) ASP.NET:$($dotnet_vers[1]) .NETCore:$($dotnet_vers[2])" diff --git a/teamcity-agent/Dockerfile b/teamcity-agent/Dockerfile index 385c791..c2006b4 100644 --- a/teamcity-agent/Dockerfile +++ b/teamcity-agent/Dockerfile @@ -1,6 +1,6 @@ #ARG DOTNET_SDK_VERSION31_TAG=3.1-focal #ARG DOTNET_SDK_VERSION5_TAG=5.0-focal -#ARG DOTNET_SDK_VERSION6_TAG=6.0-focal +ARG DOTNET_SDK_VERSION6_TAG=6.0-focal ARG DOTNET_SDK_VERSION7_TAG=7.0-jammy ARG DOTNET_SDK_VERSION8_TAG=8.0-jammy ARG DOTNET_SDK_VERSION9_TAG=9.0-preview-jammy @@ -13,7 +13,7 @@ ARG TEAMCITYAGENT_IMAGE_TAG=2022.04.5-linux FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION9_TAG} AS dotnetsdk9 FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION8_TAG} AS dotnetsdk8 FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION7_TAG} AS dotnetsdk7 -#FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION6_TAG} AS dotnetsdk6 +FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION6_TAG} AS dotnetsdk6 #FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION5_TAG} AS dotnetsdk5 #FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_SDK_VERSION31_TAG} AS dotnetsdk3 FROM $MINVER_IMAGE AS minver @@ -25,7 +25,7 @@ WORKDIR /usr/local/bin WORKDIR /usr/share #COPY --from=dotnetsdk3 /usr/share/dotnet /usr/share/dotnet #COPY --from=dotnetsdk5 /usr/share/dotnet /usr/share/dotnet -#COPY --from=dotnetsdk6 /usr/share/dotnet /usr/share/dotnet +COPY --from=dotnetsdk6 /usr/share/dotnet /usr/share/dotnet COPY --from=dotnetsdk7 /usr/share/dotnet /usr/share/dotnet COPY --from=dotnetsdk8 /usr/share/dotnet /usr/share/dotnet COPY --from=dotnetsdk9 /usr/share/dotnet /usr/share/dotnet @@ -45,9 +45,9 @@ USER root #ARG ASPNET_VERSION5=5.0.0 #ARG DOTNET_VERSION5=5.0.0 -#ARG DOTNET_SDK_VERSION6=6.0.0 -#ARG ASPNET_VERSION6=6.0.0 -#ARG DOTNET_VERSION6=6.0.0 +ARG DOTNET_SDK_VERSION6=6.0.0 +ARG ASPNET_VERSION6=6.0.0 +ARG DOTNET_VERSION6=6.0.0 ARG DOTNET_SDK_VERSION7=7.0.0 ARG ASPNET_VERSION7=7.0.0 @@ -74,11 +74,11 @@ ARG DOCKER_COMPOSE_VERSION=2.24.6 # ASPNET_VERSION5=${ASPNET_VERSION5} \ # DOTNET_VERSION5=${DOTNET_VERSION5} \ # \ -# DOTNET_SDK_VERSION6=${DOTNET_SDK_VERSION6} \ -# ASPNET_VERSION6=${ASPNET_VERSION6} \ -# DOTNET_VERSION6=${DOTNET_VERSION6} \ -# \ -ENV DOTNET_SDK_VERSION7=${DOTNET_SDK_VERSION7} \ +ENV DOTNET_SDK_VERSION6=${DOTNET_SDK_VERSION6} \ + ASPNET_VERSION6=${ASPNET_VERSION6} \ + DOTNET_VERSION6=${DOTNET_VERSION6} \ + \ + DOTNET_SDK_VERSION7=${DOTNET_SDK_VERSION7} \ ASPNET_VERSION7=${ASPNET_VERSION7} \ DOTNET_VERSION7=${DOTNET_VERSION7} \ \