Skip to content
This repository has been archived by the owner. It is now read-only.
Switch branches/tags
Go to file
Cannot retrieve contributors at this time
FROM AS build
# copy csproj and restore as distinct layers
COPY *.sln .
COPY src/WeatherLink/*.csproj ./src/WeatherLink/
COPY test/WeatherLink.Tests/*.csproj ./test/WeatherLink.Tests/
RUN dotnet restore
# copy everything else and build app
COPY src/WeatherLink/. ./src/WeatherLink/
WORKDIR /src/WeatherLink
RUN dotnet build -c Release -o app
FROM build as test
WORKDIR /test/WeatherLinks.Tests
COPY test/WeatherLink.Tests/. .
RUN dotnet build -c Release -o app
RUN dotnet test -c Release -o app
FROM build as publish
WORKDIR /src/WeatherLink
RUN dotnet publish -c Release -o app
FROM AS runtime
COPY --from=publish /src/WeatherLink/app ./
ENTRYPOINT ["dotnet", "WeatherLink.dll"]