-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
18b3a59
commit 91d5e42
Showing
4 changed files
with
45 additions
and
3 deletions.
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
**/.classpath | ||
**/.dockerignore | ||
**/.env | ||
**/.git | ||
# **/.git | ||
**/.gitignore | ||
**/.project | ||
**/.settings | ||
|
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,40 @@ | ||
FROM --platform=$BUILDPLATFORM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build | ||
ARG BUILD_CONFIGURATION=Release | ||
ARG TARGETARCH=x64 | ||
RUN apk add --no-cache git | ||
WORKDIR /src | ||
|
||
COPY .git/ ./.git/ | ||
|
||
# RUN dotnet workload install wasm-tools | ||
|
||
# copy csproj and restore as distinct layers | ||
COPY Tools/GbxExplorerOld/Server/*.csproj Tools/GbxExplorerOld/Server/ | ||
COPY Tools/GbxExplorerOld/Client/*.csproj Tools/GbxExplorerOld/Client/ | ||
COPY Src/GBX.NET/*.csproj Src/GBX.NET/ | ||
COPY Src/GBX.NET.LZO/*.csproj Src/GBX.NET.LZO/ | ||
COPY Src/GBX.NET.Hashing/*.csproj Src/GBX.NET.Hashing/ | ||
COPY Src/GBX.NET.ZLib/*.csproj Src/GBX.NET.ZLib/ | ||
COPY Generators/GBX.NET.Generators/*.csproj Generators/GBX.NET.Generators/ | ||
RUN dotnet restore Tools/GbxExplorerOld/Server/GbxExplorerOld.Server.csproj -a $TARGETARCH | ||
|
||
# copy and publish app and libraries | ||
COPY Tools/GbxExplorerOld/Server/ Tools/GbxExplorerOld/Server/ | ||
COPY Tools/GbxExplorerOld/Client/ Tools/GbxExplorerOld/Client/ | ||
COPY Src/GBX.NET/ Src/GBX.NET/ | ||
COPY Src/GBX.NET.LZO/ Src/GBX.NET.LZO/ | ||
COPY Src/GBX.NET.Hashing/ Src/GBX.NET.Hashing/ | ||
COPY Src/GBX.NET.ZLib/ Src/GBX.NET.ZLib/ | ||
COPY Generators/GBX.NET.Generators/ Generators/GBX.NET.Generators/ | ||
COPY Resources/ Resources/ | ||
RUN dotnet publish Tools/GbxExplorerOld/Server -c $BUILD_CONFIGURATION -a $TARGETARCH -o /app --no-restore | ||
|
||
|
||
# final stage/image | ||
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine | ||
EXPOSE 8080 | ||
EXPOSE 8081 | ||
WORKDIR /app | ||
COPY --from=build /app . | ||
USER $APP_UID | ||
ENTRYPOINT ["./GbxExplorerOld.Server"] |
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