File tree 2 files changed +20
-9
lines changed
2 files changed +20
-9
lines changed Original file line number Diff line number Diff line change 1
- FROM mcr.microsoft.com/dotnet/sdk:5 .0 AS build
2
- WORKDIR /src
1
+ FROM mcr.microsoft.com/dotnet/sdk:6 .0 AS build
2
+ WORKDIR /src/app
3
3
4
- RUN dotnet new -i Microsoft.DotNet.Common.ProjectTemplates.5.0
5
- RUN dotnet new console --framework net5.0
6
- RUN dotnet add package Knapcode.TorSharp
4
+ RUN mkdir ../TorSharp
5
+ COPY . ../TorSharp/
7
6
8
- COPY Program.cs .
7
+ RUN dotnet new console --framework net6.0
8
+ RUN dotnet add reference ../TorSharp/src/TorSharp/TorSharp.csproj
9
+
10
+ COPY samples/Docker/Program.cs .
9
11
10
12
RUN dotnet build
11
13
12
14
FROM build AS publish
13
15
RUN dotnet publish -c Release -o /app
14
16
15
- FROM mcr.microsoft.com/dotnet/runtime:5 .0
17
+ FROM mcr.microsoft.com/dotnet/runtime:6 .0
16
18
WORKDIR /app
17
19
COPY --from=publish /app .
18
20
19
21
RUN cat /etc/os-release
20
22
21
23
RUN apt-get update -y && apt-get install -y libbrotli1 libmbedtls-dev && apt-get clean
22
24
23
- RUN dotnet src .dll
25
+ RUN dotnet app .dll
Original file line number Diff line number Diff line change 1
- docker build . - t docker- repro -- no- cache -- progress plain
1
+ Push-Location
2
+ try {
3
+ $root = [System.IO.Path ]::GetFullPath((Join-Path $PSScriptRoot ../ ..))
4
+ Set-Location $root
5
+ docker build . - t docker- repro -- no- cache -- progress plain -f (Join-Path $PSScriptRoot " Dockerfile" )
6
+ }
7
+ catch {
8
+ Pop-Location
9
+ }
10
+
You can’t perform that action at this time.
0 commit comments