Skip to content

Commit

Permalink
[TW-83370] Update .NET SDKs according to LTS / STS versions supported…
Browse files Browse the repository at this point in the history
… by Microsoft. (#111)

* Remove .NET 3.1 from Linux-based Docker Images.

* Remove .NET 3.1 from Windows-based Docker Images.

* Remove .NET 3.1 from ARM-based Linux images.

* Add .NET 7.0 for base configurations of Linux-based Docker images.

* Add .NET 7.0 into base configurations of Linux ARM-based .NET images.

* Include installation of .NET 7.0 into Dockerfiles for ARM-based Docker images (Linux).

* Add .NET 7.0 to Windows Server Core image.

* Re-generate Dockerfiles & Documentation with respect to .NET update to 7.0.

* Remove .NET 5 from Windows-based DOcker Images.

* Remove .NET 5.0 from Linux-based images.

* Update checksum & remove duplicated line.

* Update checksums for .NET 7.0 @ ARM images.

* Re-generate files for Linux images.

* Re-generate checksums for Windows images.

* Update Dockerfile: add extra output of checksums.

* Add detailed output of the state of downloaded .NET (checksum)

* List arguments related to .NET 7.0 within ARG parameters.

* Remove duplicated symlink creation.

* Update SHA512 for .NET 7.0 @ Windows

* Re-generate Windows images without .NET 5.0

* Add basic intermidiate Dockerfiles for custom images with .NET 3.1

* * Implement generic Dockerfile for custom .NET SDK vesions.
* Add documentation about building Docker images with custom SDKs.

* Remove .NET SDK 7.0 from Linux-based Docker images (AMD & ARM)

* Add template for custom .NET image for Windows image.

* Remove .NET 7.0 (STS) from Windows-based Docker Images.

* Add placeholders for custom Windows images.

* Finess generic Dockerfiles for Windows images with custom .NET.

* Fix checksums.

* Structure & update doc.

* Small doc update.

* Add link to custom TeamCity Agents into main documentation.

* Add 'LTS' annotation.

* Remove extra symbol within .NET SDK version reference.

* Update scope of ARG variables within Docker images.

* Fix typo.

* Re-generate Docker files to prevent the addition of .NET 7.0 (STS) to Windows-based Docker images.

* Update README.md

text edits

---------

Co-authored-by: Valrravn <[email protected]>
  • Loading branch information
AndreyKoltsov1997 and Valrravn authored Oct 6, 2023
1 parent 76dee47 commit ca91674
Show file tree
Hide file tree
Showing 24 changed files with 223 additions and 356 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ This image adds a TeamCity agent suitable for Java and .NET development.
- Check the docker images by running ```docker-compose up``` in the directories like [checks/windows-local](checks/windows-local) or [checks/linux-local](checks/linux-local).
- Push all repo changes.

### To build custom TeamCity Agent, it is possible to leverage Dockerfiles we have provided
- Please refer to the documentation regarding [custom TeamCity Agent Images for more information](custom/README.md).

### To build Docker images that were not provided in docker repositories, you could generate them by yourself

- Ensure [Docker](https://www.docker.com/get-started) installed.
Expand Down
11 changes: 1 addition & 10 deletions configs/common.config
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,6 @@ agentCommentHeader=This is an official [JetBrains TeamCity](https://www.jetbrain
proxyUrl=
powerShellComponentName=[PowerShell](https://github.com/PowerShell/PowerShell#get-powershell)


# Matches .NET Runtime 6.0.21 - https://dotnet.microsoft.com/en-us/download/dotnet/6.0
dotnetComponentVersion=6.0.413
dotnetComponentName=.NET SDK v.${dotnetComponentVersion}

# .NET 3.1.32 - https://dotnet.microsoft.com/en-us/download/dotnet/3.1
dotnetComponentVersion_31=3.1.32
dotnetComponentName_31=.NET Runtime v.${dotnetComponentVersion_31}

# .NET 5.0.17 - https://dotnet.microsoft.com/en-us/download/dotnet/5.0
dotnetComponentVersion_50=5.0.17
dotnetComponentName_50=.NET Runtime v.${dotnetComponentVersion_50}
dotnetComponentName=.NET SDK v.${dotnetComponentVersion} (LTS)
14 changes: 1 addition & 13 deletions configs/linux.config
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,9 @@ jdkServerLinuxComponentName=JDK <img align="center" height="18" src="/docs/media
# https://dotnet.microsoft.com/download/dotnet/6.0
dotnetLinuxComponentVersion=${dotnetComponentVersion}
dotnetLinuxComponent=https://${proxyUrl}dotnetcli.blob.core.windows.net/dotnet/Sdk/${dotnetComponentVersion}/dotnet-sdk-${dotnetComponentVersion}-linux-x64.tar.gz
dotnetLinuxComponentSHA512=4390ba65e592c4f770b247f11228bbd2ed70aab30fbe6613c2bf7ec0c7c54d09b5a47ff160d4424dacc59661613fd4c9460d62f141a64def02a7228dd160f916
dotnetLinuxComponentSHA512=ee0a77d54e6d4917be7310ff0abb3bad5525bfb4beb1db0c215e65f64eb46511f5f12d6c7ff465a1d4ab38577e6a1950fde479ee94839c50e627020328a702de
dotnetLinuxComponentName=${dotnetComponentName} x86 Checksum (SHA512) ${dotnetLinuxComponentSHA512}

# https://dotnet.microsoft.com/download/dotnet/3.1
dotnetLinuxComponentVersion_31=${dotnetComponentVersion_31}
dotnetLinuxComponent_31=https://${proxyUrl}dotnetcli.azureedge.net/dotnet/Runtime/${dotnetComponentVersion_31}/dotnet-runtime-${dotnetComponentVersion_31}-linux-x64.tar.gz
dotnetLinuxComponentSHA512_31=56c5e045844f5474a9a12b42e4a22c851985fac5690e227ce62b529d644c4faeaafdfe255de2f1e86a90c0c114e7de66ce4de1692fbf66357ac4d35341f933c3
dotnetLinuxComponentName_31=${dotnetComponentName_31} x86 Checksum (SHA512) ${dotnetLinuxComponentSHA512_31}

# https://dotnet.microsoft.com/download/dotnet/5.0
dotnetLinuxComponentVersion_50=${dotnetComponentVersion_50}
dotnetLinuxComponent_50=https://${proxyUrl}dotnetcli.azureedge.net/dotnet/Runtime/${dotnetComponentVersion_50}/dotnet-runtime-${dotnetComponentVersion_50}-linux-x64.tar.gz
dotnetLinuxComponentSHA512_50=f47eec03d2b6777e78e2a993306727fa6871cf7f6e295ed70f684745a9f9fc960f0068750007519733426db52afa10e0bcd1c58879019d5d8f1f5f295868e4f3
dotnetLinuxComponentName_50=${dotnetComponentName_50} x86 Checksum (SHA512) ${dotnetLinuxComponentSHA512_50}

# https://packages.ubuntu.com/focal/git
# http://ppa.launchpad.net/git-core/ppa/ubuntu/dists/focal/main/binary-amd64/
gitLinuxComponentVersion=1:2.42.0-0ppa1~ubuntu20.04.1
Expand Down
2 changes: 0 additions & 2 deletions configs/linux/Agent/Ubuntu/Ubuntu-sudo.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
# @AddToolToDoc ${dockerLinuxComponentName}
# @AddToolToDoc [Docker Compose v.${dockerComposeLinuxComponentVersion}](https://github.com/docker/compose/releases/tag/${dockerComposeLinuxComponentVersion})
# @AddToolToDoc ${containerdIoLinuxComponentName}
# @AddToolToDoc [${dotnetLinuxComponentName_31}](${dotnetLinuxComponent_31})
# @AddToolToDoc [${dotnetLinuxComponentName}](${dotnetLinuxComponent})
# @AddToolToDoc [${dotnetLinuxComponentName_50}](${dotnetLinuxComponent_50})
# @AddToolToDoc ${p4Name}

# Based on ${teamcityAgentImage}
Expand Down
23 changes: 1 addition & 22 deletions configs/linux/Agent/Ubuntu/Ubuntu.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# The list of required arguments
# ARG dotnetLinuxComponent
# ARG dotnetLinuxComponentSHA512
# ARG dotnetLinuxComponent_31
# ARG dotnetLinuxComponentSHA512_31
# ARG dotnetLinuxComponent_50
# ARG dotnetLinuxComponentSHA512_50
# ARG teamcityMinimalAgentImage
# ARG dotnetLibs
# ARG gitLinuxComponentVersion
Expand Down Expand Up @@ -33,9 +29,7 @@
# @AddToolToDoc ${dockerLinuxComponentName}
# @AddToolToDoc [Docker Compose v.${dockerComposeLinuxComponentVersion}](https://github.com/docker/compose/releases/tag/${dockerComposeLinuxComponentVersion})
# @AddToolToDoc ${containerdIoLinuxComponentName}
# @AddToolToDoc [${dotnetLinuxComponentName_31}](${dotnetLinuxComponent_31})
# @AddToolToDoc [${dotnetLinuxComponentName}](${dotnetLinuxComponent})
# @AddToolToDoc [${dotnetLinuxComponentName_50}](${dotnetLinuxComponent_50})
# @AddToolToDoc ${p4Name}


Expand Down Expand Up @@ -65,10 +59,6 @@ ENV DOTNET_CLI_TELEMETRY_OPTOUT=true \

ARG dotnetLinuxComponent
ARG dotnetLinuxComponentSHA512
ARG dotnetLinuxComponent_31
ARG dotnetLinuxComponentSHA512_31
ARG dotnetLinuxComponent_50
ARG dotnetLinuxComponentSHA512_50
ARG dotnetLibs
ARG gitLinuxComponentVersion
ARG gitLFSLinuxComponentVersion
Expand Down Expand Up @@ -111,20 +101,9 @@ RUN apt-get update && \
# https://github.com/goodwithtech/dockle/blob/master/CHECKPOINT.md#dkl-di-0005
apt-get clean && rm -rf /var/lib/apt/lists/* && \
mkdir -p /usr/share/dotnet && \
# .NET Framework 3.1
curl -SL ${dotnetLinuxComponent_31} --output /tmp/dotnet.tar.gz && \
echo "${dotnetLinuxComponentSHA512_31} */tmp/dotnet.tar.gz" | sha512sum -c -; \
tar -zxf /tmp/dotnet.tar.gz -C /usr/share/dotnet && \
rm /tmp/dotnet.tar.gz && \
find /usr/share/dotnet -name "*.lzma" -type f -delete && \
# .NET 5.0
curl -SL ${dotnetLinuxComponent_50} --output /tmp/dotnet.tar.gz && \
echo "${dotnetLinuxComponentSHA512_50} */tmp/dotnet.tar.gz" | sha512sum -c -; \
tar -zxf /tmp/dotnet.tar.gz -C /usr/share/dotnet && \
rm /tmp/dotnet.tar.gz && \
find /usr/share/dotnet -name "*.lzma" -type f -delete && \
# .NET 6.0
curl -SL ${dotnetLinuxComponent} --output /tmp/dotnet.tar.gz && \
echo "Downloaded .NET 6.0 (Linux AMD64) checksum: $(sha512sum tmp/dotnet.tar.gz)" && \
echo "${dotnetLinuxComponentSHA512} */tmp/dotnet.tar.gz" | sha512sum -c -; \
tar -zxf /tmp/dotnet.tar.gz -C /usr/share/dotnet && \
rm /tmp/dotnet.tar.gz && \
Expand Down
2 changes: 0 additions & 2 deletions configs/linux/Agent/UbuntuARM/UbuntuARM-sudo.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@
# @AddToolToDoc ${containerdIoLinuxComponentName}
# @AddToolToDoc [Docker Compose v.${dockerComposeLinuxComponentVersion}](https://github.com/docker/compose/releases/tag/${dockerComposeLinuxComponentVersion})
# @AddToolToDoc [${dotnetLinuxARM64ComponentName}](${dotnetLinuxARM64Component})
# @AddToolToDoc [${dotnetLinuxARM64ComponentName_31}](${dotnetLinuxARM64Component_31})
# @AddToolToDoc [${dotnetLinuxARM64ComponentName_50}](${dotnetLinuxARM64Component_50})


# Based on ${teamcityAgentImage}
Expand Down
27 changes: 3 additions & 24 deletions configs/linux/Agent/UbuntuARM/UbuntuARM.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# The list of required arguments
# ARG dotnetLinuxARM64Component
# ARG dotnetLinuxARM64ComponentSHA512
# ARG dotnetLinuxARM64Component_31
# ARG dotnetLinuxARM64ComponentSHA512_31
# ARG dotnetLinuxARM64Component_50
# ARG dotnetLinuxARM64ComponentSHA512_50
# ARG teamcityMinimalAgentImage
# ARG dotnetLibs
# ARG gitLinuxComponentVersion
Expand Down Expand Up @@ -32,8 +28,6 @@
# @AddToolToDoc ${containerdIoLinuxComponentName}
# @AddToolToDoc [Docker Compose v.${dockerComposeLinuxComponentVersion}](https://github.com/docker/compose/releases/tag/${dockerComposeLinuxComponentVersion})
# @AddToolToDoc [${dotnetLinuxARM64ComponentName}](${dotnetLinuxARM64Component})
# @AddToolToDoc [${dotnetLinuxARM64ComponentName_31}](${dotnetLinuxARM64Component_31})
# @AddToolToDoc [${dotnetLinuxARM64ComponentName_50}](${dotnetLinuxARM64Component_50})


# Based on ${teamcityMinimalAgentImage}
Expand Down Expand Up @@ -62,10 +56,6 @@ ENV DOTNET_CLI_TELEMETRY_OPTOUT=true \

ARG dotnetLinuxARM64Component
ARG dotnetLinuxARM64ComponentSHA512
ARG dotnetLinuxARM64Component_31
ARG dotnetLinuxARM64ComponentSHA512_31
ARG dotnetLinuxARM64Component_50
ARG dotnetLinuxARM64ComponentSHA512_50
ARG dotnetLibs
ARG gitLinuxComponentVersion
ARG gitLFSLinuxComponentVersion
Expand Down Expand Up @@ -98,26 +88,15 @@ RUN apt-get update && \
# https://github.com/goodwithtech/dockle/blob/master/CHECKPOINT.md#dkl-di-0005
apt-get clean && rm -rf /var/lib/apt/lists/* && \
mkdir -p /usr/share/dotnet && \
# .NET Framework 3.1
curl -SL ${dotnetLinuxARM64Component_31} --output /tmp/dotnet.tar.gz && \
echo "${dotnetLinuxARM64ComponentSHA512_31} */tmp/dotnet.tar.gz" | sha512sum -c -; \
tar -zxf /tmp/dotnet.tar.gz -C /usr/share/dotnet && \
rm /tmp/dotnet.tar.gz && \
find /usr/share/dotnet -name "*.lzma" -type f -delete && \
# .NET 5.0
curl -SL ${dotnetLinuxARM64Component_50} --output /tmp/dotnet.tar.gz && \
echo "${dotnetLinuxARM64ComponentSHA512_50} */tmp/dotnet.tar.gz" | sha512sum -c -; \
tar -zxf /tmp/dotnet.tar.gz -C /usr/share/dotnet && \
rm /tmp/dotnet.tar.gz && \
find /usr/share/dotnet -name "*.lzma" -type f -delete && \
# .NET
# .NET 6.0
curl -SL ${dotnetLinuxARM64Component} --output /tmp/dotnet.tar.gz && \
echo "Downloaded .NET 6.0 (Linux ARM64) checksum: $(sha512sum tmp/dotnet.tar.gz)" && \
echo "${dotnetLinuxARM64ComponentSHA512} */tmp/dotnet.tar.gz" | sha512sum -c -; \
tar -zxf /tmp/dotnet.tar.gz -C /usr/share/dotnet && \
rm /tmp/dotnet.tar.gz && \
find /usr/share/dotnet -name "*.lzma" -type f -delete && \
# Trigger .NET CLI first run experience by running arbitrary cmd to populate local package cache \
ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet && \
# Trigger .NET CLI first run experience by running arbitrary cmd to populate local package cache
dotnet help && \
dotnet --info && \
# Other
Expand Down
14 changes: 1 addition & 13 deletions configs/linuxARM.config
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,4 @@ jdkServerLinuxARM64ComponentName=JDK <img align="center" height="18" src="/docs/
dotnetLinuxARM64ComponentVersion=${dotnetComponentVersion}
dotnetLinuxARM64Component=https://${proxyUrl}dotnetcli.blob.core.windows.net/dotnet/Sdk/${dotnetComponentVersion}/dotnet-sdk-${dotnetComponentVersion}-linux-arm64.tar.gz
dotnetLinuxARM64ComponentSHA512=7f05a9774d79e694da5a6115d9916abf87a65e40bd6bdaa5dca1f705795436bc8e764242f7045207386a86732ef5519f60bdb516a3860e4860bca7ee91a21759
dotnetLinuxARM64ComponentName=${dotnetComponentName} arm64 Checksum (SHA512) ${dotnetLinuxARM64ComponentSHA512}

# https://dotnet.microsoft.com/download/dotnet/3.1
dotnetLinuxARM64ComponentVersion_31=${dotnetComponentVersion_31}
dotnetLinuxARM64Component_31=https://${proxyUrl}dotnetcli.azureedge.net/dotnet/Runtime/${dotnetComponentVersion_31}/dotnet-runtime-${dotnetComponentVersion_31}-linux-arm64.tar.gz
dotnetLinuxARM64ComponentSHA512_31=ff311df0db488f3b5cc03c7f6724f8442de7e60fa0a503ec8f536361ce7a357ad26d09d2499d68c50ebdfa751a5520bba4aaa77a38b191c892d5a018561ce422
dotnetLinuxARM64ComponentName_31=${dotnetComponentName_31} arm64 Checksum (SHA512) ${dotnetLinuxARM64ComponentSHA512_31}

# https://dotnet.microsoft.com/download/dotnet/5.0
dotnetLinuxARM64ComponentVersion_50=${dotnetComponentVersion_50}
dotnetLinuxARM64Component_50=https://${proxyUrl}dotnetcli.azureedge.net/dotnet/Runtime/${dotnetComponentVersion_50}/dotnet-runtime-${dotnetComponentVersion_50}-linux-arm64.tar.gz
dotnetLinuxARM64ComponentSHA512_50=99cb11871924d3abedcc9c8079c54bc0c550203c7cbe4e349ed70d4355f40e4620b68d90b797e6461d898c06bed6953580e2cd4ad01483e5de107ca5a3409610
dotnetLinuxARM64ComponentName_50=${dotnetComponentName_50} arm65 Checksum (SHA512) ${dotnetLinuxARM64ComponentSHA512_50}
dotnetLinuxARM64ComponentName=${dotnetComponentName} ARM64 Checksum (SHA512) ${dotnetLinuxARM64ComponentSHA512}
12 changes: 0 additions & 12 deletions configs/windows.config
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,5 @@ dotnetWindowsComponent=https://${proxyUrl}dotnetcli.blob.core.windows.net/dotnet
dotnetWindowsComponentSHA512=a9e1bbb52484ad0667b258451ebb6b47ce6c7b788c015aee8a86c5e0c4dcf4ee8c82d796921869d64c92bb2afef2c7ceea09cfe255d8519d48f2471a098c361e
dotnetWindowsComponentName=${dotnetComponentName} x86 Checksum (SHA512) ${dotnetWindowsComponentSHA512}

# https://dotnet.microsoft.com/download/dotnet/3.1
dotnetWindowsComponentVersion_31=${dotnetComponentVersion_31}
dotnetWindowsComponent_31=https://${proxyUrl}dotnetcli.azureedge.net/dotnet/Runtime/${dotnetComponentVersion_31}/dotnet-runtime-${dotnetComponentVersion_31}-win-x64.zip
dotnetWindowsComponentSHA512_31=72a3feb6784c5c69cb464ad4a8678e719615bd1e4e9a7c3cf5c1f67a4f01e08c073424532772f1e320d05f63c01079c6a089be45f4777abe035f14ffbf06f38b
dotnetWindowsComponentName_31=${dotnetComponentName_31} x86 Checksum (SHA512) ${dotnetWindowsComponentSHA512_31}

# https://dotnet.microsoft.com/download/dotnet/5.0
dotnetWindowsComponentVersion_50=${dotnetComponentVersion_50}
dotnetWindowsComponent_50=https://${proxyUrl}dotnetcli.azureedge.net/dotnet/Runtime/${dotnetComponentVersion_50}/dotnet-runtime-${dotnetComponentVersion_50}-win-x64.zip
dotnetWindowsComponentSHA512_50=424df2b535f73c40aea164623a8a8f549bd18f89406eb2cb84289cb4cfceb3450db7762c5582756263d79ed628a574730e708d87dc906fd2c00d29f64942c782
dotnetWindowsComponentName_50=${dotnetComponentName_50} x86 Checksum (SHA512) ${dotnetWindowsComponentSHA512_50}

mercurialWindowsComponentName=Mercurial x64 v.5.9.1
mercurialWindowsComponent=https://${proxyUrl}www.mercurial-scm.org/release/windows/mercurial-5.9.1-x64.msi
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
# ARG windowsservercoreImage
# ARG dotnetWindowsComponent
# ARG dotnetWindowsComponentSHA512
# ARG dotnetWindowsComponent_31
# ARG dotnetWindowsComponentSHA512_31
# ARG dotnetWindowsComponent_50
# ARG dotnetWindowsComponentSHA512_50
# ARG jdkWindowsComponent
# ARG jdkWindowsComponentMD5SUM
# ARG gitWindowsComponent
Expand All @@ -28,8 +24,6 @@
# @AddToolToDoc [${gitWindowsComponentName}](${gitWindowsComponent})
# @AddToolToDoc ${powerShellComponentName}
# @AddToolToDoc [${mercurialWindowsComponentName}](${mercurialWindowsComponent})
# @AddToolToDoc [${dotnetWindowsComponentName_31}](${dotnetWindowsComponent_31})
# @AddToolToDoc [${dotnetWindowsComponentName_50}](${dotnetWindowsComponent_50})
# @AddToolToDoc [${dotnetWindowsComponentName}](${dotnetWindowsComponent})

# Based on ${teamcityMinimalAgentImage}
Expand All @@ -46,10 +40,6 @@ SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPref

ARG dotnetWindowsComponent
ARG dotnetWindowsComponentSHA512
ARG dotnetWindowsComponent_31
ARG dotnetWindowsComponentSHA512_31
ARG dotnetWindowsComponent_50
ARG dotnetWindowsComponentSHA512_50
ARG jdkWindowsComponent
ARG jdkWindowsComponentMD5SUM
ARG gitWindowsComponent
Expand All @@ -59,14 +49,8 @@ ARG mercurialWindowsComponent
RUN [Net.ServicePointManager]::SecurityProtocol = 'tls12, tls11, tls' ; \
$code = Get-Content -Path "scripts/Web.cs" -Raw ; \
Add-Type -IgnoreWarnings -TypeDefinition "$code" -Language CSharp ; \
$downloadScript = [Scripts.Web]::DownloadFiles($Env:jdkWindowsComponent + '#MD5#' + $Env:jdkWindowsComponentMD5SUM, 'jdk.zip', $Env:gitWindowsComponent + '#SHA256#' + $Env:gitWindowsComponentSHA256, 'git.zip', $Env:mercurialWindowsComponent, 'hg.msi', $Env:dotnetWindowsComponent + '#SHA512#' + $Env:dotnetWindowsComponentSHA512, 'dotnet.zip', $Env:dotnetWindowsComponent_31 + '#SHA512#' + $Env:dotnetWindowsComponentSHA512_31, 'dotnet_31.zip', $Env:dotnetWindowsComponent_50 + '#SHA512#' + $Env:dotnetWindowsComponentSHA512_50, 'dotnet_50.zip') ; \
$downloadScript = [Scripts.Web]::DownloadFiles($Env:jdkWindowsComponent + '#MD5#' + $Env:jdkWindowsComponentMD5SUM, 'jdk.zip', $Env:gitWindowsComponent + '#SHA256#' + $Env:gitWindowsComponentSHA256, 'git.zip', $Env:mercurialWindowsComponent, 'hg.msi', $Env:dotnetWindowsComponent + '#SHA512#' + $Env:dotnetWindowsComponentSHA512, 'dotnet.zip') ; \
Remove-Item -Force -Recurse $Env:ProgramFiles\dotnet; \
# .NET 3.1
Expand-Archive dotnet_31.zip -Force -DestinationPath $Env:ProgramFiles\dotnet; \
Remove-Item -Force dotnet_31.zip; \
# .NET 5.0
Expand-Archive dotnet_50.zip -Force -DestinationPath $Env:ProgramFiles\dotnet; \
Remove-Item -Force dotnet_50.zip; \
# .NET 6.0
Expand-Archive dotnet.zip -Force -DestinationPath $Env:ProgramFiles\dotnet; \
Remove-Item -Force dotnet.zip; \
Expand Down
27 changes: 2 additions & 25 deletions context/generated/linux/Agent/Ubuntu/18.04/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ ARG dockerComposeLinuxComponentVersion='1.28.5'
ARG dockerLinuxComponentVersion='5:20.10.12~3-0~ubuntu'
ARG dotnetLibs='libc6 libgcc1 libgssapi-krb5-2 libicu60 libssl1.1 libstdc++6 zlib1g'
ARG dotnetLinuxComponent='https://dotnetcli.blob.core.windows.net/dotnet/Sdk/6.0.413/dotnet-sdk-6.0.413-linux-x64.tar.gz'
ARG dotnetLinuxComponent_31='https://dotnetcli.azureedge.net/dotnet/Runtime/3.1.32/dotnet-runtime-3.1.32-linux-x64.tar.gz'
ARG dotnetLinuxComponent_50='https://dotnetcli.azureedge.net/dotnet/Runtime/5.0.17/dotnet-runtime-5.0.17-linux-x64.tar.gz'
ARG dotnetLinuxComponentSHA512='4390ba65e592c4f770b247f11228bbd2ed70aab30fbe6613c2bf7ec0c7c54d09b5a47ff160d4424dacc59661613fd4c9460d62f141a64def02a7228dd160f916'
ARG dotnetLinuxComponentSHA512_31='56c5e045844f5474a9a12b42e4a22c851985fac5690e227ce62b529d644c4faeaafdfe255de2f1e86a90c0c114e7de66ce4de1692fbf66357ac4d35341f933c3'
ARG dotnetLinuxComponentSHA512_50='f47eec03d2b6777e78e2a993306727fa6871cf7f6e295ed70f684745a9f9fc960f0068750007519733426db52afa10e0bcd1c58879019d5d8f1f5f295868e4f3'
ARG dotnetLinuxComponentSHA512='ee0a77d54e6d4917be7310ff0abb3bad5525bfb4beb1db0c215e65f64eb46511f5f12d6c7ff465a1d4ab38577e6a1950fde479ee94839c50e627020328a702de'
ARG gitLFSLinuxComponentVersion='2.3.4-1'
ARG gitLinuxComponentVersion='1:2.41.0-0ppa1~ubuntu18.04.1'
ARG p4Version='2022.2-2468771'
Expand All @@ -18,10 +14,6 @@ ARG teamcityMinimalAgentImage='teamcity-minimal-agent:EAP-linux-18.04'
# The list of required arguments
# ARG dotnetLinuxComponent
# ARG dotnetLinuxComponentSHA512
# ARG dotnetLinuxComponent_31
# ARG dotnetLinuxComponentSHA512_31
# ARG dotnetLinuxComponent_50
# ARG dotnetLinuxComponentSHA512_50
# ARG teamcityMinimalAgentImage
# ARG dotnetLibs
# ARG gitLinuxComponentVersion
Expand Down Expand Up @@ -59,10 +51,6 @@ ENV DOTNET_CLI_TELEMETRY_OPTOUT=true \

ARG dotnetLinuxComponent
ARG dotnetLinuxComponentSHA512
ARG dotnetLinuxComponent_31
ARG dotnetLinuxComponentSHA512_31
ARG dotnetLinuxComponent_50
ARG dotnetLinuxComponentSHA512_50
ARG dotnetLibs
ARG gitLinuxComponentVersion
ARG gitLFSLinuxComponentVersion
Expand Down Expand Up @@ -105,20 +93,9 @@ RUN apt-get update && \
# https://github.com/goodwithtech/dockle/blob/master/CHECKPOINT.md#dkl-di-0005
apt-get clean && rm -rf /var/lib/apt/lists/* && \
mkdir -p /usr/share/dotnet && \
# .NET Framework 3.1
curl -SL ${dotnetLinuxComponent_31} --output /tmp/dotnet.tar.gz && \
echo "${dotnetLinuxComponentSHA512_31} */tmp/dotnet.tar.gz" | sha512sum -c -; \
tar -zxf /tmp/dotnet.tar.gz -C /usr/share/dotnet && \
rm /tmp/dotnet.tar.gz && \
find /usr/share/dotnet -name "*.lzma" -type f -delete && \
# .NET 5.0
curl -SL ${dotnetLinuxComponent_50} --output /tmp/dotnet.tar.gz && \
echo "${dotnetLinuxComponentSHA512_50} */tmp/dotnet.tar.gz" | sha512sum -c -; \
tar -zxf /tmp/dotnet.tar.gz -C /usr/share/dotnet && \
rm /tmp/dotnet.tar.gz && \
find /usr/share/dotnet -name "*.lzma" -type f -delete && \
# .NET 6.0
curl -SL ${dotnetLinuxComponent} --output /tmp/dotnet.tar.gz && \
echo "Downloaded .NET 6.0 (Linux AMD64) checksum: $(sha512sum tmp/dotnet.tar.gz)" && \
echo "${dotnetLinuxComponentSHA512} */tmp/dotnet.tar.gz" | sha512sum -c -; \
tar -zxf /tmp/dotnet.tar.gz -C /usr/share/dotnet && \
rm /tmp/dotnet.tar.gz && \
Expand Down
Loading

0 comments on commit ca91674

Please sign in to comment.