Skip to content

Commit d5be872

Browse files
authoredAug 9, 2022
ARM64 image support (#274)
* WIP ARM64 image support close #269 * added `build.fsx` support * added ARM64 integration testing * added Linux integration testing * fixing integration testing FAKE * fixing up `docker build` instructions * added more detailed logging * have `docker build` working again * fixed Docker images and ARM build * fixed Windows image name * allow cluster to actually form * fixed Azure Pipelines template * added fail gate back * added Windows runtime tests back * fixed powershell invocation * update ARM64 file to use `dotnet tool install -g -a arm64` * target Ubuntu 20.04 * removed `-a arm64` param * fixed formatting * ensure .NET Core 3.1 SDK is installed * skip installing .NET from CLI * disable PBM install on ARM64 * add a DockerInstall stage to AzDo * added `dotnet` commands back to ARM image * disable caching on `docker build` * try 3.1 base image * changed base image URIs * testing .NET 6 images * Revert "testing .NET 6 images" This reverts commit 4abd075. * enable Docker BuiltKit * removed Docker install, BuildKit, but added QEMU * clean up QEMU
1 parent a32f665 commit d5be872

11 files changed

+159
-230
lines changed
 

‎build-system/azure-pipeline.template.yaml

+12-16
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,19 @@ jobs:
1616
clean: false # whether to fetch clean each time
1717
submodules: recursive # set to 'true' for a single level of submodules or 'recursive' to get submodules of submodules
1818
persistCredentials: true
19+
- task: UseDotNet@2
20+
displayName: 'Use .NET 6 SDK 6.0.100'
21+
inputs:
22+
version: 6.0.100
23+
- task: UseDotNet@2
24+
displayName: "Use .NET Core SDK 3.1.415"
25+
inputs:
26+
version: 3.1.415
1927
# Linux or macOS
28+
- script: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
29+
displayName: Docker - Register QEMU
30+
continueOnError: true
31+
condition: in( variables['Agent.OS'], 'Linux', 'Darwin' )
2032
- task: Bash@3
2133
displayName: Linux / OSX Build
2234
inputs:
@@ -38,22 +50,6 @@ jobs:
3850
testResultsFiles: '**/*.trx' #TestResults folder usually
3951
testRunTitle: ${{ parameters.name }}
4052
mergeTestResults: true
41-
#Docker build
42-
# Build on Linux
43-
- task: Bash@3
44-
displayName: Docker Build (Linux)
45-
inputs:
46-
filePath: ${{ parameters.scriptFileName }}
47-
arguments: ${{ parameters.dockerBuildArgs }}
48-
continueOnError: false
49-
condition: in( variables['Agent.OS'], 'Linux', 'Darwin' )
50-
- task: BatchScript@1
51-
displayName: Docker Build (Windows)
52-
inputs:
53-
filename: ${{ parameters.scriptFileName }}
54-
arguments: ${{ parameters.dockerBuildArgs }}
55-
continueOnError: true
56-
condition: eq( variables['Agent.OS'], 'Windows_NT' )
5753
- script: 'echo 1>&2'
5854
failOnStderr: true
5955
displayName: 'If above is partially succeeded, then fail'

‎build-system/linux-pr-validation.yaml

+6
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,9 @@ jobs:
2020
vmImage: 'ubuntu-20.04'
2121
scriptFileName: ./build.sh
2222
scriptArgs: all
23+
- template: azure-pipeline.template.yaml
24+
parameters:
25+
name: LinuxRuntimesTests
26+
vmImage: 'ubuntu-20.04'
27+
scriptFileName: ./build.sh
28+
scriptArgs: RunTestsOnRuntimes

‎build-system/windows-release.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787

8888
- job: windowsImageDeploy
8989
pool:
90-
vmImage: windows-2019
90+
vmImage: windows-latest
9191
dependsOn: publishNetCore
9292
steps:
9393
- task: DownloadBuildArtifacts@0

‎build.fsx

+40-94
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,17 @@ let toolsDir = __SOURCE_DIRECTORY__ @@ "tools"
3737
let output = __SOURCE_DIRECTORY__ @@ "bin"
3838
let outputTests = __SOURCE_DIRECTORY__ @@ "TestResults"
3939
let outputPerfTests = __SOURCE_DIRECTORY__ @@ "PerfResults"
40+
let dockerScriptDir = __SOURCE_DIRECTORY__ @@ "src" @@ "Lighthouse"
4041
let outputNuGet = output @@ "nuget"
4142

4243
exception ConnectionFailure of string
4344

45+
let composedGetDirName (p:string) =
46+
System.IO.Path.GetDirectoryName p
47+
48+
let composedGetFileNameWithoutExtension (p:string) =
49+
System.IO.Path.GetFileNameWithoutExtension p
50+
4451
Target "Clean" (fun _ ->
4552
ActivateFinalTarget "KillCreatedProcesses"
4653

@@ -131,24 +138,24 @@ Target "NBench" <| fun _ ->
131138

132139
projects |> Seq.iter runSingleProject
133140

141+
let dockerFilesWithTags =
142+
match (isWindows) with
143+
| true -> [("src/Lighthouse/Dockerfile-windows", ["windows-latest"])]
144+
| _ -> [("src/Lighthouse/Dockerfile-linux", ["latest";"linux-latest"]); ("src/Lighthouse/Dockerfile-arm64", ["arm64-latest"])]
145+
134146
Target "RunTestsOnRuntimes" (fun _ ->
135147

136148
let LighthouseConnectTimeout = 20.0 // in seconds
137-
138-
let dockerFileForTest =
139-
match (isWindows) with
140-
| true -> "src/Lighthouse/Dockerfile-windows"
141-
| _ -> "src/Lighthouse/Dockerfile-linux"
142149

143150
let installPbm () =
144151
// Install pbm client to test connections
145152
ExecProcess(fun info ->
146153
info.FileName <- "dotnet"
147154
info.Arguments <- "tool install --global pbm") (TimeSpan.FromMinutes 5.0) |> ignore // this is fine if tool is already installed
148155

149-
let startLighthouseDocker dockerFile =
150-
printfn "Starting Lighthouse..."
151-
let runArgs = "run -d --name lighthouse --hostname lighthouse1 -p 4053:4053 -p 9110:9110 --env CLUSTER_IP=127.0.0.1 --env CLUSTER_SEEDS=akka.tcp://some@lighthouse1:4053 --env CLUSTER_PORT=4053 lighthouse:latest"
156+
let startLighthouseDocker dockerFile tag =
157+
printfn "Starting Lighthouse w/ Dockerfile %s" dockerFile
158+
let runArgs = sprintf "run -d --name lighthouse --hostname lighthouse1 -p 4053:4053 -p 9110:9110 --env ACTORSYSTEM=some --env CLUSTER_IP=127.0.0.1 --env CLUSTER_SEEDS=akka.tcp://some@127.0.0.1:4053 --env CLUSTER_PORT=4053 lighthouse:%s" tag
152159
let runResult = ExecProcess(fun info ->
153160
info.FileName <- "docker"
154161
info.WorkingDirectory <- (Directory.GetParent dockerFile).FullName
@@ -162,7 +169,7 @@ Target "RunTestsOnRuntimes" (fun _ ->
162169
info.WorkingDirectory <- (Directory.GetParent dockerFile).FullName
163170
info.Arguments <- "rm -f lighthouse") (System.TimeSpan.FromMinutes 5.0) |> ignore // cleanup failure should not fail the test
164171

165-
let startLighhouseLocally exePath =
172+
let startLighthouseLocally exePath =
166173
printfn "Starting Lighthouse locally..."
167174
try
168175
let runResult = ExecProcess(fun info ->
@@ -184,21 +191,15 @@ Target "RunTestsOnRuntimes" (fun _ ->
184191
| _ -> printfn "Lighthouse was connected successfully"
185192

186193
installPbm()
187-
startLighthouseDocker dockerFileForTest
188-
try
189-
connectLighthouse()
190-
finally
191-
stopLighthouseDocker dockerFileForTest
192-
193-
// Test Full .NET Framework version under windows only
194-
// TODO: To make this work, need to start lighthouse and pbm as two parallel processes
195-
(*
196-
match (isWindows) with
197-
| true ->
198-
startLighhouseLocally "src/Lighthouse/bin/Release/net461/Lighthouse.exe"
199-
connectLighthouse()
200-
| _ -> ()
201-
*)
194+
195+
let runSpec (dockerFile, tags) =
196+
startLighthouseDocker dockerFile (tags |> List.head)
197+
try
198+
connectLighthouse()
199+
finally
200+
stopLighthouseDocker dockerFile
201+
202+
dockerFilesWithTags |> Seq.iter runSpec
202203
)
203204

204205

@@ -243,7 +244,7 @@ Target "SignPackages" (fun _ ->
243244
info.FileName <- signPath
244245
info.WorkingDirectory <- __SOURCE_DIRECTORY__
245246
info.Arguments <- args) (System.TimeSpan.FromMinutes 5.0) (* Reasonably long-running task. *)
246-
if result <> 0 then failwithf "SignClient failed.%s" args
247+
if result <> 0 then failwithf "SignClient failed. %s" args
247248

248249
assemblies |> Seq.iter (signAssembly)
249250
else
@@ -326,74 +327,19 @@ let mapDockerImageName (projectName:string) =
326327
| "Lighthouse" -> Some("lighthouse")
327328
| _ -> None
328329

329-
let composedGetDirName (p:string) =
330-
System.IO.Path.GetDirectoryName p
331-
332-
let composedGetFileNameWithoutExtension (p:string) =
333-
System.IO.Path.GetFileNameWithoutExtension p
334-
335330
Target "BuildDockerImages" (fun _ ->
336-
let projects = !! "src/**/*.csproj"
337-
-- "src/**/*Tests.csproj" // Don't publish unit tests
338-
-- "src/**/*Tests*.csproj"
339-
340-
let dockerFile =
341-
match (isWindows) with
342-
| true -> "Dockerfile-windows"
343-
| _ -> "Dockerfile-linux"
344-
345-
let dockerTags (imageName:string, assemblyVersion:string) =
346-
match(isWindows) with
347-
| true -> [| imageName + ":" + releaseNotes.AssemblyVersion; imageName + ":" + releaseNotes.AssemblyVersion + "-nanoserver1803"; imageName + ":latest" |]
348-
| _ -> [| imageName + ":" + releaseNotes.AssemblyVersion; imageName + ":" + releaseNotes.AssemblyVersion + "-linux"; imageName + ":latest" |]
349-
350-
351-
let remoteRegistryUrl = getBuildParamOrDefault "remoteRegistry" ""
352-
353-
let buildDockerImage imageName projectPath =
354-
355-
let args =
356-
if(hasBuildParam "remoteRegistry") then
357-
StringBuilder()
358-
|> append "build"
359-
|> append "-f"
360-
|> append dockerFile
361-
|> append "-t"
362-
|> append (imageName + ":" + releaseNotes.AssemblyVersion)
363-
|> append "-t"
364-
|> append (imageName + ":latest")
365-
|> append "-t"
366-
|> append (remoteRegistryUrl + "/" + imageName + ":" + releaseNotes.AssemblyVersion)
367-
|> append "-t"
368-
|> append (remoteRegistryUrl + "/" + imageName + ":latest")
369-
|> append "."
370-
|> toText
371-
else
372-
StringBuilder()
373-
|> append "build"
374-
|> append "-f"
375-
|> append dockerFile
376-
|> append "-t"
377-
|> append (imageName + ":" + releaseNotes.AssemblyVersion)
378-
|> append "-t"
379-
|> append (imageName + ":latest")
380-
|> append "."
381-
|> toText
382-
383-
ExecProcess(fun info ->
384-
info.FileName <- "docker"
385-
info.WorkingDirectory <- composedGetDirName projectPath
386-
info.Arguments <- args) (System.TimeSpan.FromMinutes 5.0) (* Reasonably long-running task. *)
387-
388-
let runSingleProject project =
389-
let projectName = composedGetFileNameWithoutExtension project
390-
let imageName = mapDockerImageName projectName
391-
let result = match imageName with
392-
| None -> 0
393-
| Some(name) -> buildDockerImage name project
394-
if result <> 0 then failwithf "docker build failed. %s" project
395-
396-
projects |> Seq.iter (runSingleProject)
331+
if(isWindows) then
332+
let result = ExecProcess(fun info ->
333+
info.FileName <- "powershell"
334+
info.WorkingDirectory <- dockerScriptDir
335+
info.Arguments <- sprintf " ./buildWindowsDockerImages.ps1 -tagVersion %s" releaseNotes.AssemblyVersion) (System.TimeSpan.FromMinutes 5.0) (* Reasonably long-running task. *)
336+
if result <> 0 then failwithf "Unable to build Lighthouse Dockerfiles"
337+
else
338+
let result = ExecProcess(fun info ->
339+
info.FileName <- "sh"
340+
info.WorkingDirectory <- dockerScriptDir
341+
info.Arguments <- sprintf " ./buildLinuxDockerImages.sh %s" releaseNotes.AssemblyVersion) (System.TimeSpan.FromMinutes 5.0) (* Reasonably long-running task. *)
342+
if result <> 0 then failwithf "Unable to build Lighthouse Dockerfiles"
397343
)
398344

399345
//--------------------------------------------------------------------------------
@@ -460,7 +406,7 @@ Target "Nuget" DoNothing
460406

461407
// tests dependencies
462408
"Build" ==> "RunTests"
463-
"PublishCode" ==> "BuildDockerImages" ==> "RunTestsOnRuntimes"
409+
"BuildDockerImages" ==> "RunTestsOnRuntimes"
464410

465411
// nuget dependencies
466412
"Clean" ==> "Build" ==> "CreateNuget"
@@ -470,7 +416,7 @@ Target "Nuget" DoNothing
470416
"Clean" ==> "BuildRelease" ==> "Docfx"
471417

472418
// Docker
473-
"BuildRelease" ==> "PublishCode" ==> "BuildDockerImages" ==> "Docker"
419+
"BuildDockerImages" ==> "Docker"
474420

475421
// all
476422
"BuildRelease" ==> "All"

‎build.ps1

-44
Original file line numberDiff line numberDiff line change
@@ -46,50 +46,6 @@ if (!(Test-Path $ToolPath)) {
4646
New-Item -Path $ToolPath -Type directory | out-null
4747
}
4848

49-
###########################################################################
50-
# INSTALL .NET CORE CLI
51-
###########################################################################
52-
53-
Function Remove-PathVariable([string]$VariableToRemove)
54-
{
55-
$path = [Environment]::GetEnvironmentVariable("PATH", "User")
56-
if ($path -ne $null)
57-
{
58-
$newItems = $path.Split(';', [StringSplitOptions]::RemoveEmptyEntries) | Where-Object { "$($_)" -inotlike $VariableToRemove }
59-
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "User")
60-
}
61-
62-
$path = [Environment]::GetEnvironmentVariable("PATH", "Process")
63-
if ($path -ne $null)
64-
{
65-
$newItems = $path.Split(';', [StringSplitOptions]::RemoveEmptyEntries) | Where-Object { "$($_)" -inotlike $VariableToRemove }
66-
[Environment]::SetEnvironmentVariable("PATH", [System.String]::Join(';', $newItems), "Process")
67-
}
68-
}
69-
70-
# Get .NET Core CLI path if installed.
71-
$FoundDotNetCliVersion = $null;
72-
if (Get-Command dotnet -ErrorAction SilentlyContinue) {
73-
$FoundDotNetCliVersion = dotnet --version;
74-
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
75-
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
76-
}
77-
78-
if($FoundDotNetCliVersion -ne $DotNetVersion) {
79-
$InstallPath = Join-Path $PSScriptRoot ".dotnet"
80-
if (!(Test-Path $InstallPath)) {
81-
mkdir -Force $InstallPath | Out-Null;
82-
}
83-
(New-Object System.Net.WebClient).DownloadFile($DotNetInstallerUri, "$InstallPath\dotnet-install.ps1");
84-
& $InstallPath\dotnet-install.ps1 -Channel $DotNetChannel -Version $DotNetVersion -InstallDir $InstallPath -Architecture x64;
85-
86-
Remove-PathVariable "$InstallPath"
87-
$env:PATH = "$InstallPath;$env:PATH"
88-
$env:DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
89-
$env:DOTNET_CLI_TELEMETRY_OPTOUT=1
90-
$env:DOTNET_ROOT=$InstallPath
91-
}
92-
9349
###########################################################################
9450
# INSTALL NUGET
9551
###########################################################################

‎build.sh

+1-17
Original file line numberDiff line numberDiff line change
@@ -42,22 +42,6 @@ if [ ! -d "$TOOLS_DIR" ]; then
4242
mkdir "$TOOLS_DIR"
4343
fi
4444

45-
###########################################################################
46-
# INSTALL .NET CORE CLI
47-
###########################################################################
48-
49-
echo "Installing .NET CLI..."
50-
if [ ! -d "$SCRIPT_DIR/.dotnet" ]; then
51-
mkdir "$SCRIPT_DIR/.dotnet"
52-
fi
53-
curl -Lsfo "$SCRIPT_DIR/.dotnet/dotnet-install.sh" $DOTNET_INSTALLER_URL
54-
bash "$SCRIPT_DIR/.dotnet/dotnet-install.sh" --version $DOTNET_VERSION --channel $DOTNET_CHANNEL --install-dir .dotnet --no-path
55-
export PATH="$SCRIPT_DIR/.dotnet":$PATH
56-
export DOTNET_SKIP_FIRST_TIME_EXPERIENCE=1
57-
export DOTNET_CLI_TELEMETRY_OPTOUT=1
58-
chmod -R 0755 ".dotnet"
59-
"$SCRIPT_DIR/.dotnet/dotnet" --info
60-
6145

6246
###########################################################################
6347
# INSTALL NUGET
@@ -112,7 +96,7 @@ fi
11296
# INSTALL SignTool
11397
###########################################################################
11498
if [ ! -f "$SIGNTOOL_EXE" ]; then
115-
"$SCRIPT_DIR/.dotnet/dotnet" tool install SignClient --version 1.0.82 --tool-path "$SIGNCLIENT_DIR"
99+
dotnet tool install SignClient --version 1.0.82 --tool-path "$SIGNCLIENT_DIR"
116100
if [ $? -ne 0 ]; then
117101
echo "SignClient already installed."
118102
fi

‎src/Lighthouse/Dockerfile-arm64

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
FROM mcr.microsoft.com/dotnet/sdk:3.1 AS base
2+
WORKDIR /app
3+
4+
# Install Petabridge.Cmd client so it can be invoked remotely via
5+
# Docker or K8s 'exec` commands
6+
RUN dotnet tool install --global pbm
7+
8+
# RUN pbm help
9+
10+
COPY ./bin/Release/netcoreapp3.1/publish/ /app
11+
12+
FROM mcr.microsoft.com/dotnet/runtime:3.1 AS app
13+
WORKDIR /app
14+
15+
COPY --from=base /app /app
16+
17+
# copy .NET Core global tool
18+
COPY --from=base /root/.dotnet /root/.dotnet/
19+
20+
# Needed because https://stackoverflow.com/questions/51977474/install-dotnet-core-tool-dockerfile
21+
ENV PATH="${PATH}:/root/.dotnet/tools"
22+
23+
# should be a comma-delimited list
24+
ENV CLUSTER_SEEDS "[]"
25+
ENV CLUSTER_IP ""
26+
ENV CLUSTER_PORT "4053"
27+
ENV AKKA__CLUSTER__SPLIT_BRAIN_RESOLVER__ACTIVE_STRATEGY "keep-majority"
28+
ENV AKKA__REMOTE__DOT-NETTY__TCP__BATCHING__ENABLED "false"
29+
30+
# 9110 - Petabridge.Cmd
31+
# 4053 - Akka.Cluster
32+
EXPOSE 9110 4053
33+
34+
CMD ["dotnet", "Lighthouse.dll"]

‎src/Lighthouse/Lighthouse.csproj

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77
<ItemGroup>
88
<PackageReference Include="Akka.Cluster.Hosting" Version="0.4.1" />
9-
<PackageReference Include="Microsoft.Extensions.Configuration.Xml" Version="6.0.0" />
9+
<PackageReference Include="Microsoft.Extensions.Configuration.Xml" Version="3.1.0" />
1010
<PackageReference Include="Petabridge.Cmd.Cluster" Version="$(PbmVersion)" />
1111
<PackageReference Include="Petabridge.Cmd.Remote" Version="$(PbmVersion)" />
1212
<PackageReference Include="Akka.Bootstrap.Docker">
+36-30
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,36 @@
1-
#!/usr/bin/env bash
2-
##########################################################################
3-
# Build local Alpine Linux Docker images using the current project.
4-
# Script is designed to be run inside the root directory of the Akka.Bootstrap.Docker.Sample project.
5-
##########################################################################
6-
7-
IMAGE_VERSION=$1
8-
IMAGE_NAME=$2
9-
10-
if [ -z $IMAGE_VERSION ]; then
11-
echo `date`" - Missing mandatory argument: Docker image version."
12-
echo `date`" - Usage: ./buildDockerImagesLinux.sh [imageVersion] [imageName]"
13-
exit 1
14-
fi
15-
16-
if [ -z $IMAGE_NAME ]; then
17-
IMAGE_NAME="akka.docker.boostrap"
18-
echo `date`" - Using default Docker image name [$IMAGE_NAME]"
19-
fi
20-
21-
22-
echo "Building project..."
23-
dotnet publish -c Release
24-
dotnet build-server shutdown
25-
26-
LINUX_IMAGE="$IMAGE_NAME:$IMAGE_VERSION-linux"
27-
LINUX_IMAGE_LATEST="$IMAGE_NAME:latest-linux"
28-
29-
echo "Creating Docker (Linux) image [$LINUX_IMAGE]..."
30-
docker build . -f Dockerfile-linux -t $LINUX_IMAGE -t $LINUX_IMAGE_LATEST
1+
#!/usr/bin/env bash
2+
##########################################################################
3+
# Build local Alpine Linux Docker images using the current project.
4+
# Script is designed to be run inside the root directory of the Akka.Bootstrap.Docker.Sample project.
5+
##########################################################################
6+
7+
IMAGE_VERSION=$1
8+
IMAGE_NAME=$2
9+
10+
if [ -z $IMAGE_VERSION ]; then
11+
echo `date`" - Missing mandatory argument: Docker image version."
12+
echo `date`" - Usage: ./buildLinuxDockerImages.sh [imageVersion] [imageName]"
13+
exit 1
14+
fi
15+
16+
if [ -z $IMAGE_NAME ]; then
17+
IMAGE_NAME="lighthouse"
18+
echo `date`" - Using default Docker image name [$IMAGE_NAME]"
19+
fi
20+
21+
22+
echo "Building project..."
23+
dotnet publish -c Release --framework netcoreapp3.1
24+
dotnet build-server shutdown
25+
26+
LINUX_IMAGE="$IMAGE_NAME:linux-$IMAGE_VERSION"
27+
LINUX_IMAGE_LATEST="$IMAGE_NAME:linux-latest"
28+
29+
ARM64_IMAGE="$IMAGE_NAME:arm64-$IMAGE_VERSION"
30+
ARM64_IMAGE_LATEST="$IMAGE_NAME:arm64-latest"
31+
32+
echo "Creating Docker (Linux) image [$LINUX_IMAGE]..."
33+
docker build . --no-cache -f Dockerfile-linux -t $LINUX_IMAGE -t $LINUX_IMAGE_LATEST -t "lighthouse:latest"
34+
35+
echo "Creating Docker (ARM64/Linux) image [$ARM64_IMAGE]..."
36+
docker buildx build --platform linux/arm64 . --no-cache -f Dockerfile-arm64 -t $ARM64_IMAGE -t $ARM64_IMAGE_LATEST
+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Build local Windows nanoserver Docker images using the current project.
22
# Script is designed to be run inside the root directory of the Akka.Bootstrap.Docker.Sample project.
33
param (
4-
[string]$imageName = "akka.docker.boostrap",
4+
[string]$imageName = "lighthouse",
55
[Parameter(Mandatory=$true)][string]$tagVersion
66
)
77

88
Write-Host "Building project..."
9-
dotnet publish -c Release
9+
dotnet publish -c Release --framework netcoreapp3.1
1010
dotnet build-server shutdown
1111

12-
$windowsImage = "{0}:{1}-windows" -f $imageName,$tagVersion
13-
$windowsImageLatest = "{0}:latest-windows" -f $imageName
12+
$windowsImage = "{0}:windows-{1}" -f $imageName,$tagVersion
13+
$windowsImageLatest = "{0}:windows-latest" -f $imageName
1414

1515
Write-Host ("Creating Docker (Windows) image [{0}]..." -f $windowsImage)
16-
docker build . -f Dockerfile-windows -t $windowsImage -t $windowsImageLatest
16+
docker build . --no-cache -f Dockerfile-windows -t $windowsImage -t $windowsImageLatest

‎src/common.props

+23-22
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
1-
<Project>
2-
<PropertyGroup>
3-
<Copyright>Copyright © 2015-2022 Petabridge, LLC</Copyright>
4-
<Authors>Petabridge</Authors>
5-
<VersionPrefix>1.5.5</VersionPrefix>
6-
<PackageReleaseNotes>Upgrade [Akka.Bootstrap.Docker to 0.5.3](https://github.com/petabridge/akkadotnet-bootstrap/releases/tag/0.5.3)</PackageReleaseNotes>
7-
<PackageIconUrl>https://petabridge.com/images/logo.png</PackageIconUrl>
1+
<Project>
2+
<PropertyGroup>
3+
<Copyright>Copyright © 2015-2022 Petabridge, LLC</Copyright>
4+
<Authors>Petabridge</Authors>
5+
<VersionPrefix>1.6.2</VersionPrefix>
6+
<PackageReleaseNotes>[Bumped Akka.NET version to 1.4.39](https://github.com/akkadotnet/akka.net/releases/tag/1.4.39)
7+
[Bumped Akka.Hosting from 0.2.2 to 0.3.4](https://github.com/petabridge/lighthouse/pull/266).</PackageReleaseNotes>
8+
<PackageIconUrl>https://petabridge.com/images/logo.png</PackageIconUrl>
89
<PackageProjectUrl>
910
https://github.com/petabridge/lighthouse
10-
</PackageProjectUrl>
11+
</PackageProjectUrl>
1112
<PackageLicenseUrl>
1213
https://github.com/petabridge/lighthouse/blob/dev/LICENSE
13-
</PackageLicenseUrl>
14-
<NoWarn>$(NoWarn);CS1591</NoWarn>
15-
</PropertyGroup>
16-
<PropertyGroup>
17-
<XunitVersion>2.4.2</XunitVersion>
18-
<MicrosoftSdkVersion>17.2.0</MicrosoftSdkVersion>
19-
<FluentAssertionsVersion>6.7.0</FluentAssertionsVersion>
20-
<NetCoreVersion>netcoreapp3.1</NetCoreVersion>
21-
<NetStandardVersion>netstandard1.6</NetStandardVersion>
22-
<NetFrameworkLibVersion>net461</NetFrameworkLibVersion>
23-
<NetFrameworkTestVersion>netcoreapp3.1</NetFrameworkTestVersion>
24-
<AkkaVersion>1.4.40</AkkaVersion>
25-
<PbmVersion>0.8.5</PbmVersion>
26-
</PropertyGroup>
14+
</PackageLicenseUrl>
15+
<NoWarn>$(NoWarn);CS1591</NoWarn>
16+
</PropertyGroup>
17+
<PropertyGroup>
18+
<XunitVersion>2.4.2</XunitVersion>
19+
<MicrosoftSdkVersion>17.2.0</MicrosoftSdkVersion>
20+
<FluentAssertionsVersion>6.7.0</FluentAssertionsVersion>
21+
<NetCoreVersion>netcoreapp3.1</NetCoreVersion>
22+
<NetStandardVersion>netstandard1.6</NetStandardVersion>
23+
<NetFrameworkLibVersion>net461</NetFrameworkLibVersion>
24+
<NetFrameworkTestVersion>netcoreapp3.1</NetFrameworkTestVersion>
25+
<AkkaVersion>1.4.40</AkkaVersion>
26+
<PbmVersion>0.8.5</PbmVersion>
27+
</PropertyGroup>
2728
</Project>

0 commit comments

Comments
 (0)
Please sign in to comment.