Skip to content

Commit

Permalink
Specify 'linux/arm64' platform within template compose file in case A…
Browse files Browse the repository at this point in the history
…RM or Aarch64 is specified.
  • Loading branch information
AndreyKoltsov1997 committed Jun 16, 2023
1 parent ae3845d commit 1cb51b0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .teamcity/hosted/utils/Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ class Utils {
* Creates sample docker-compose manifest and returns file that matches it.
*/
fun getSampleComposeFile(repo: String, version: String, namePostfix: String = "", platform: String = "amd"): String {
val dockerPlatformId = if (platform.lowercase().contains("arm")) "linux/arm64" else "linux/amd64"
val isArmArch = (platform.lowercase().contains("arm") || platform.lowercase().contains("arch"))
val dockerPlatformId = if (isArmArch) "linux/arm64" else "linux/amd64"
return """
version: "3.3"
services:
Expand Down

0 comments on commit 1cb51b0

Please sign in to comment.