Welcome to mirror list, hosted at ThFree Co, Russian Federation.

build-docker-sdk.ps1 « docker « eng - github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 599c533810b9c28b386739c8f616ec1d008f811a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env pwsh
# Builds libraries and produces a dotnet sdk docker image
# that contains the current bits in its shared framework folder.

[CmdletBinding(PositionalBinding=$false)]
Param(
  [string][Alias('t')]$imageName = "dotnet-sdk-libs-current",
  [string][Alias('c')]$configuration = "Release",
  [switch][Alias('w')]$buildWindowsContainers
)

$REPO_ROOT_DIR=$(git -C "$PSScriptRoot" rev-parse --show-toplevel)

if ($buildWindowsContainers)
{
  # Due to size concerns, we don't currently do docker builds on windows.
  # Build on the host machine, then simply copy artifacts to the target docker image.
  # This should result in significantly lower build times, for now.
  & "$REPO_ROOT_DIR/libraries.cmd" -ci -c $configuration
  
  # Dockerize the build artifacts
  docker build --tag $imageName `
      --build-arg CONFIGURATION=$configuration `
      --build-arg TESTHOST_LOCATION=. `
      --file "$PSScriptRoot/libraries-sdk.windows.Dockerfile" `
      "$REPO_ROOT_DIR/artifacts/bin/testhost"
}
else 
{
  # Docker build libraries and copy to dotnet sdk image
  docker build --tag $imageName `
      --build-arg CONFIGURATION=$configuration `
      --file "$PSScriptRoot/libraries-sdk.linux.Dockerfile" `
      $REPO_ROOT_DIR
}