2020-07-13 10:51:03 +08:00
|
|
|
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
|
|
|
|
|
2021-04-27 11:10:54 +08:00
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:5.0 AS base
|
2020-07-13 10:51:03 +08:00
|
|
|
WORKDIR /app
|
2021-04-27 11:10:54 +08:00
|
|
|
EXPOSE 80
|
|
|
|
EXPOSE 443
|
2020-07-13 10:51:03 +08:00
|
|
|
|
2021-04-27 11:10:54 +08:00
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
|
2020-07-13 10:51:03 +08:00
|
|
|
WORKDIR /src
|
|
|
|
COPY ["FastTunnel.Server/FastTunnel.Server.csproj", "FastTunnel.Server/"]
|
|
|
|
COPY ["FastTunnel.Core/FastTunnel.Core.csproj", "FastTunnel.Core/"]
|
|
|
|
RUN dotnet restore "FastTunnel.Server/FastTunnel.Server.csproj"
|
|
|
|
COPY . .
|
|
|
|
WORKDIR "/src/FastTunnel.Server"
|
|
|
|
RUN dotnet build "FastTunnel.Server.csproj" -c Release -o /app/build
|
|
|
|
|
|
|
|
FROM build AS publish
|
|
|
|
RUN dotnet publish "FastTunnel.Server.csproj" -c Release -o /app/publish
|
|
|
|
|
|
|
|
FROM base AS final
|
2021-06-30 08:19:33 +08:00
|
|
|
#RUN mkdir -p /vols
|
2020-07-13 10:51:03 +08:00
|
|
|
WORKDIR /app
|
2021-06-30 08:19:33 +08:00
|
|
|
COPY --from=publish /app/publish/config /vols/config
|
2020-07-13 10:51:03 +08:00
|
|
|
COPY --from=publish /app/publish .
|
2021-06-30 08:19:33 +08:00
|
|
|
COPY ./start.sh .
|
|
|
|
ENTRYPOINT ["/bin/bash","start.sh"]
|
|
|
|
#ENTRYPOINT ["dotnet", "FastTunnel.Server.dll"]
|