tdns/Dockerfile

18 lines
512 B
Docker
Raw Permalink Normal View History

2022-07-24 20:09:33 +00:00
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
WORKDIR /app
RUN git clone https://gitlab.tesses.net/tesses50/tdns.git .
WORKDIR /app/Tesses.Dns
# Restore as distinct layers
RUN dotnet restore
# Build and publish a release
RUN dotnet publish -c Release -o /app/out
RUN mkdir /app/out/site && cp -r /app/Site/* /app/out/site/
# Build runtime image
FROM mcr.microsoft.com/dotnet/runtime:6.0
WORKDIR /app
EXPOSE 53
EXPOSE 9427
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "Tesses.Dns.dll","--docker"]