-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8983f87
commit 5b53923
Showing
6 changed files
with
83 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
**/bin/* | ||
**/obj/* | ||
**/out/* | ||
**/.vs/* | ||
**/_ReSharper.Caches/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"Remote": { | ||
"UseRemoteConnection": true, | ||
"HostName": "zfsdev.root.dom", | ||
"UserName": "bbs", | ||
"UseSudo": true | ||
}, | ||
"Logging": { | ||
"LogLevel": { | ||
"Default": "Trace", | ||
"Microsoft": "Warning", | ||
"Microsoft.Hosting.Lifetime": "Information" | ||
} | ||
}, | ||
"AllowedHosts": "*", | ||
"UseLinuxAuth": false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# create build environment in /Build | ||
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build-env | ||
WORKDIR /Build | ||
|
||
# Copy source files | ||
COPY ./Api/* ./Api/ | ||
|
||
# Build and publish to /Build/out | ||
RUN dotnet build Api/Api.csproj -c Release --framework net6.0 --runtime linux-x64 | ||
|
||
RUN dotnet publish Api/Api.csproj --no-build -c Release --framework net6.0 --sc --runtime linux-x64 -o out | ||
CMD ls -l | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0 | ||
|
||
# install required packages | ||
run apt-get update | ||
|
||
#required to get linux auth working | ||
run apt-get -y install libpam0g-dev | ||
|
||
#required for remote connections to the zfs server | ||
run apt-get -y install ssh | ||
|
||
# Create app dir /App and copy publishing output to /App | ||
WORKDIR /App | ||
COPY --from=build-env /Build/out . | ||
|
||
# Tell docker we will be exposing port 5000 | ||
EXPOSE 5000/TCP | ||
|
||
# run the api in the asp.net environment Docker, which corresponds to the appsettings.Docker.json | ||
ENTRYPOINT ["dotnet","Api.dll","--environment=Docker"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters