MagicOnion Docker & Self-Hosted Deployment

GitHub

Unified Realtime/API framework for .NET platform and Unity.

4,382 stars C# C# 1 file ยท ~13,117 tokens #c-sharp#grpc#rpc#streaming#swagger#unity
1. Pull Image (DOCKERHUB) docker pull Cysharp/MagicOnion:latest
2. Docker Run (1-Click Launch) docker run -d --name magiconion -p 12345:12345 --restart always cysharp/magiconion:latest
3. Podman Run podman run -d --name magiconion -p 12345:12345 --restart always cysharp/magiconion:latest
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/cysharp/magiconion:latest
5. ORAS Pull (OCI Artifact) oras pull cysharp/magiconion:latest
samples/ChatApp/ChatApp.Server/Dockerfile
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
EXPOSE 12345
WORKDIR /app

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
WORKDIR /src
COPY ["ChatApp.Server/ChatApp.Server.csproj", "ChatApp.Server/"]
COPY ["ChatApp.Shared/ChatApp.Shared.csproj", "ChatApp.Shared/"]
RUN dotnet restore "ChatApp.Server/ChatApp.Server.csproj"
COPY . .
WORKDIR "/src/ChatApp.Server"
RUN dotnet build "ChatApp.Server.csproj" -c Debug -o /app

FROM build AS publish
RUN dotnet publish "ChatApp.Server.csproj" -c Debug -o /app

FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "ChatApp.Server.dll"]