|
| 1 | +FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy-chiseled AS base |
| 2 | + |
| 3 | +LABEL org.opencontainers.image.source https://github.com/Syriiin/difficalcy |
| 4 | + |
| 5 | +WORKDIR /app |
| 6 | +EXPOSE 80 |
| 7 | +ENV ASPNETCORE_URLS=http://+:80 |
| 8 | +ENV ASPNETCORE_ENVIRONMENT=Production |
| 9 | +ENV BEATMAP_DIRECTORY=/app/beatmaps |
| 10 | + |
| 11 | +FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy AS build |
| 12 | +WORKDIR /src |
| 13 | + |
| 14 | +COPY ./Difficalcy/Difficalcy.csproj ./Difficalcy/ |
| 15 | +COPY ./Difficalcy.Catch/Difficalcy.Catch.csproj ./Difficalcy.Catch/ |
| 16 | +COPY ./Difficalcy.Mania/Difficalcy.Mania.csproj ./Difficalcy.Mania/ |
| 17 | +COPY ./Difficalcy.Osu/Difficalcy.Osu.csproj ./Difficalcy.Osu/ |
| 18 | +COPY ./Difficalcy.Taiko/Difficalcy.Taiko.csproj ./Difficalcy.Taiko/ |
| 19 | + |
| 20 | +RUN dotnet restore ./Difficalcy.Catch/Difficalcy.Catch.csproj |
| 21 | +RUN dotnet restore ./Difficalcy.Mania/Difficalcy.Mania.csproj |
| 22 | +RUN dotnet restore ./Difficalcy.Osu/Difficalcy.Osu.csproj |
| 23 | +RUN dotnet restore ./Difficalcy.Taiko/Difficalcy.Taiko.csproj |
| 24 | + |
| 25 | +COPY ./Difficalcy/ ./Difficalcy/ |
| 26 | +COPY ./Difficalcy.Catch/ ./Difficalcy.Catch/ |
| 27 | +COPY ./Difficalcy.Mania/ ./Difficalcy.Mania/ |
| 28 | +COPY ./Difficalcy.Osu/ ./Difficalcy.Osu/ |
| 29 | +COPY ./Difficalcy.Taiko/ ./Difficalcy.Taiko/ |
| 30 | + |
| 31 | +RUN dotnet publish ./Difficalcy.Catch/Difficalcy.Catch.csproj -o /app/difficalcy-catch --runtime linux-x64 --self-contained false |
| 32 | +RUN dotnet publish ./Difficalcy.Mania/Difficalcy.Mania.csproj -o /app/difficalcy-mania --runtime linux-x64 --self-contained false |
| 33 | +RUN dotnet publish ./Difficalcy.Osu/Difficalcy.Osu.csproj -o /app/difficalcy-osu --runtime linux-x64 --self-contained false |
| 34 | +RUN dotnet publish ./Difficalcy.Taiko/Difficalcy.Taiko.csproj -o /app/difficalcy-taiko --runtime linux-x64 --self-contained false |
| 35 | + |
| 36 | +FROM base AS difficalcy-catch |
| 37 | +COPY --from=build /app/difficalcy-catch . |
| 38 | +ENTRYPOINT ["dotnet", "Difficalcy.Catch.dll"] |
| 39 | + |
| 40 | +FROM base AS difficalcy-mania |
| 41 | +COPY --from=build /app/difficalcy-mania . |
| 42 | +ENTRYPOINT ["dotnet", "Difficalcy.Mania.dll"] |
| 43 | + |
| 44 | +FROM base AS difficalcy-osu |
| 45 | +COPY --from=build /app/difficalcy-osu . |
| 46 | +ENTRYPOINT ["dotnet", "Difficalcy.Osu.dll"] |
| 47 | + |
| 48 | +FROM base AS difficalcy-taiko |
| 49 | +COPY --from=build /app/difficalcy-taiko . |
| 50 | +ENTRYPOINT ["dotnet", "Difficalcy.Taiko.dll"] |
0 commit comments