초기커밋
This commit is contained in:
29
GameServer/Dockerfile
Normal file
29
GameServer/Dockerfile
Normal file
@@ -0,0 +1,29 @@
|
||||
FROM mcr.microsoft.com/dotnet/runtime:6.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||
WORKDIR /src
|
||||
COPY ["GameServer/GameServer.csproj", "GameServer/"]
|
||||
COPY ["TestClient/TestClient.csproj", "TestClient/"]
|
||||
COPY ["Protocol/Protocol.csproj", "Protocol/"]
|
||||
COPY ["LoginServer/LoginServer.csproj", "LoginServer/"]
|
||||
COPY ["ServerCore/ServerCore.csproj", "ServerCore/"]
|
||||
COPY ["ServerCommon/ServerCommon.csproj", "ServerCommon/"]
|
||||
RUN dotnet restore "GameServer/GameServer.csproj"
|
||||
COPY . .
|
||||
WORKDIR "/src/GameServer"
|
||||
RUN dotnet build "GameServer.csproj" -c Release -o /app/build
|
||||
|
||||
FROM build AS publish
|
||||
RUN apt-get update -yq \
|
||||
&& apt-get install curl gnupg -yq \
|
||||
&& curl -sL https://deb.nodesource.com/setup_14.x | bash \
|
||||
&& apt-get install nodejs -yq
|
||||
RUN dotnet publish "GameServer.csproj" -c Release -o /app/publish
|
||||
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
ENTRYPOINT ["dotnet", "GameServer.dll"]
|
||||
Reference in New Issue
Block a user