Skip to content

Commit 626bac2

Browse files
authored
Merge pull request #268 from datalust/fix/linux-publishing
More docker publishing tweaks
2 parents 83ef4b6 + 526c2ab commit 626bac2

File tree

5 files changed

+7
-6
lines changed

5 files changed

+7
-6
lines changed

Build.Docker.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function Execute-Tests
2828
function Build-DockerImage($arch)
2929
{
3030
$rid = "linux-$($arch.rid)"
31-
& dotnet publish src/SeqCli/SeqCli.csproj -c Release -f $framework -r $rid --self-contained /p:VersionPrefix=$version
31+
& dotnet publish src/SeqCli/SeqCli.csproj -c Release -f $framework -r $rid --self-contained /p:VersionPrefix=$version /p:PublishSingleFile=true
3232
if($LASTEXITCODE -ne 0) { exit 2 }
3333

3434
& docker buildx build --platform "$($arch.platform)" -f dockerfiles/seqcli/$rid.Dockerfile -t "$image-ci:$version-$($arch.rid)" .

dockerfiles/seqcli/linux-arm64.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=linux/arm/v8 ubuntu:22.04
1+
FROM ubuntu:22.04
22

33
RUN apt-get update \
44
&& apt-get install -y --no-install-recommends \

dockerfiles/seqcli/linux-x64.Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM --platform=linux/amd64 ubuntu:22.04
1+
FROM ubuntu:22.04
22

33
RUN apt-get update \
44
&& apt-get install -y --no-install-recommends \

setup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ chmod +x dotnet-install.sh
1414
./dotnet-install.sh --install-dir $HOME/.dotnetcli --no-path --version $RequiredDotnetVersion
1515
rm dotnet-install.sh
1616

17-
docker run --privileged --rm docker/binfmt:a7996909642ee92942dcd6cff44b9b95f08dad64
17+
docker run --privileged --rm linuxkit/binfmt:bebbae0c1100ebf7bf2ad4dfb9dfd719cf0ef132
1818
sudo service docker restart

src/SeqCli/Util/Content.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1-
using System.IO;
1+
using System;
2+
using System.IO;
23

34
namespace SeqCli.Util;
45

56
static class Content
67
{
78
public static string GetPath(string relativePath)
89
{
9-
var thisDir = Path.GetDirectoryName(Path.GetFullPath(typeof(Content).Assembly.Location)) ?? ".";
10+
var thisDir = Path.GetDirectoryName(Path.GetFullPath(AppContext.BaseDirectory)) ?? ".";
1011
return Path.Combine(thisDir, relativePath);
1112
}
1213
}

0 commit comments

Comments
 (0)