2023-08-28 01:02:03 +01:00
|
|
|
FROM mcr.microsoft.com/dotnet/runtime:7.0 AS base
|
2023-08-26 12:50:06 +01:00
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
|
|
|
|
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
|
|
|
|
ADD http://static.virtualparadise.org/dev-downloads/vpsdk_20210802_5afc54ae_linux_debian-stretch_x86_64.tar.gz ./vpsdk.tar.gz
|
|
|
|
RUN echo "9156B19DD83D2E2290F6C49228C99320478758C41D958E50030078A62DB6417B vpsdk.tar.gz" | sha256sum -c -&& \
|
|
|
|
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"]
|