Skip to content

Commit 78d1130

Browse files
committed
(build) fix docker image build
1 parent 0c2287b commit 78d1130

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

build/test.cake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Task("UnitTest")
2828
if (!parameters.IsRunningOnMacOS) {
2929
settings.TestAdapterPath = new DirectoryPath(".");
3030
var resultsPath = MakeAbsolute(testResultsPath.CombineWithFilePath($"{projectName}.results.xml"));
31-
settings.Logger = $"nunit;LogFilePath={resultsPath}";
31+
settings.Loggers = new[] { $"nunit;LogFilePath={resultsPath}" };
3232
}
3333

3434
var coverletSettings = new CoverletSettings {

build/utils/docker.cake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ void DockerBuild(DockerImage dockerImage, BuildParameters parameters)
3838
{
3939
$"contentFolder=/content",
4040
$"DOTNET_VERSION={targetframework.Replace("netcoreapp", "")}",
41-
$"DISTRO={distro}"
41+
$"DISTRO={distro}",
42+
$"VERSION={parameters.Version.NugetVersion}"
4243
},
4344
// Pull = true,
4445
// Platform = platform // TODO this one is not supported on docker versions < 18.02

src/Docker/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
ARG DISTRO='debian-9'
22
ARG DOTNET_VERSION='3.1'
3+
ARG VERSION='5.5.1'
34

45
FROM gittools/build-images:$DISTRO-sdk-$DOTNET_VERSION as installer
56
ARG contentFolder
7+
ARG VERSION
68

79
WORKDIR /app
810
COPY $contentFolder/ ./
9-
RUN dotnet tool install GitVersion.Tool --tool-path /tools --add-source .
11+
RUN dotnet tool install GitVersion.Tool --version $VERSION --tool-path /tools --add-source .
1012

1113
FROM gittools/build-images:$DISTRO-runtime-$DOTNET_VERSION
1214

0 commit comments

Comments
 (0)