2024-01-06 12:04:07 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/runtime:8.0 AS base
|
2023-08-26 12:50:06 +01:00
|
|
|
WORKDIR /app
|
|
|
|
|
2024-01-06 12:04:07 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
|
2023-08-26 12:50:06 +01:00
|
|
|
WORKDIR /src
|
2023-08-28 01:35:01 +01:00
|
|
|
COPY ["VPLink/VPLink.csproj", "VPLink/"]
|
2023-08-26 12:50:06 +01:00
|
|
|
RUN dotnet restore "VPLink/VPLink.csproj"
|
|
|
|
COPY . .
|
2023-08-26 16:26:55 +01:00
|
|
|
WORKDIR "/src/VPLink"
|
2023-08-26 12:50:06 +01:00
|
|
|
RUN dotnet build "VPLink.csproj" -c Release -o /app/build
|
|
|
|
|
|
|
|
FROM build AS publish
|
2023-08-28 01:02:03 +01:00
|
|
|
RUN dotnet publish "VPLink.csproj" -c Release -o /app/publish
|
2023-08-26 12:50:06 +01:00
|
|
|
|
2023-08-26 16:20:25 +01:00
|
|
|
FROM base AS vpsdk
|
|
|
|
WORKDIR /vpsdk
|
2024-01-06 12:05:00 +00:00
|
|
|
ADD http://edwin-share.virtualparadise.org/2024/01/vpsdk_20240102_e6701b5e_linux_debian10_x86_64 ./vpsdk.tar.gz
|
|
|
|
RUN echo "5784270749FFC3AD31EFF9BA7DD82203C31968C60DD732A4F76CBB2947C1DB6D vpsdk.tar.gz" | sha256sum -c -&& \
|
2023-08-26 16:20:25 +01:00
|
|
|
tar xfv vpsdk.tar.gz --strip-components=1 && \
|
|
|
|
rm -r vpsdk.tar.gz include
|
|
|
|
|
2023-08-26 12:50:06 +01:00
|
|
|
FROM base AS final
|
|
|
|
WORKDIR /app
|
2023-08-26 16:20:25 +01:00
|
|
|
COPY --from=vpsdk /vpsdk/lib/libvpsdk.so .
|
2023-08-26 12:50:06 +01:00
|
|
|
COPY --from=publish /app/publish .
|
|
|
|
ENTRYPOINT ["dotnet", "VPLink.dll"]
|