add dockerfile

This commit is contained in:
Gergő Jedlicska
2023-08-10 15:13:27 +02:00
parent 72ad134dc4
commit cd3682988c
4 changed files with 22 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
**/bin/
**/obj/
.git
.env
.envrc
+3
View File
@@ -1,6 +1,9 @@
# Created by https://www.toptal.com/developers/gitignore/api/dotnetcore,linux,visualstudiocode,rider,visualstudio,windows,macos
# Edit at https://www.toptal.com/developers/gitignore?templates=dotnetcore,linux,visualstudiocode,rider,visualstudio,windows,macos
.env
.envrc
### DotnetCore ###
# .NET Core build folders
bin/
+1 -1
View File
@@ -14,7 +14,7 @@
"args": [
"{\"projectId\": \"03434ee1f1\", \"modelId\": \"base design\", \"versionId\": \"09d2a0e55a\", \"speckleServerUrl\": \"https://latest.speckle.systems\"}",
"{\"speckleTypeToCount\": \"Base\"}",
"7e9d3a711fa422a0cfffd3f695f9024d3553016d3c"
"${env:SPECKLE_TOKEN}"
],
"cwd": "${workspaceFolder}",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
+13
View File
@@ -0,0 +1,13 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 as build-env
WORKDIR /src
COPY *.csproj .
RUN dotnet restore --use-current-runtime
COPY . .
RUN dotnet publish --use-current-runtime --self-contained false --no-restore -o /publish
FROM mcr.microsoft.com/dotnet/runtime:7.0 as runtime
WORKDIR /publish
COPY --from=build-env /publish .
RUN ls /publish
CMD ["dotnet", "SpeckleAutomateDotnetExample.dll"]