Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code challenge attempt #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 3 additions & 24 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,5 @@
FROM microsoft/dotnet:2.1-aspnetcore-runtime AS base
WORKDIR /app
EXPOSE 80
FROM teknight/dcc:1.2

FROM microsoft/dotnet:2.1-sdk AS build
WORKDIR /src
COPY ["CodeChallengeV2/CodeChallengeV2.csproj", "CodeChallengeV2/"]
RUN dotnet restore "CodeChallengeV2/CodeChallengeV2.csproj"
COPY ["CodeChallengeV2.Tests/CodeChallengeV2.Tests.csproj", "CodeChallengeV2.Tests/"]
RUN dotnet restore "CodeChallengeV2.Tests/CodeChallengeV2.Tests.csproj"
COPY . .
# Don't mind me - just a delegate employee curios if my kotlin implementation will pass.
# Using prebuilt docker image to not spoil solutions for anyone..


RUN dotnet build "CodeChallengeV2/CodeChallengeV2.csproj" -c Release -o /app

RUN dotnet test "CodeChallengeV2.Tests/CodeChallengeV2.Tests.csproj" -c Release -o /app



FROM build AS publish
RUN dotnet publish "CodeChallengeV2/CodeChallengeV2.csproj" -c Release -o /app

FROM base AS final
WORKDIR /app
COPY --from=publish /app .
ENTRYPOINT ["dotnet", "CodeChallengeV2.dll"]