Skip to content

Commit

Permalink
Merge pull request #9 from runeanielsen/master
Browse files Browse the repository at this point in the history
reverts to not use alpine because of performance
  • Loading branch information
runeanielsen authored Oct 2, 2020
2 parents e3752c4 + 6ea8ec9 commit c40c6df
Showing 1 changed file with 23 additions and 4 deletions.
27 changes: 23 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,32 @@
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.402-alpine3.12 AS build-env
FROM mcr.microsoft.com/dotnet/core/sdk:3.1 AS build-env
WORKDIR /app

COPY . ./
COPY ./*sln ./

COPY ./src/OpenFTTH.GDBIntegrator/*.csproj ./src/OpenFTTH.GDBIntegrator/
COPY ./src/OpenFTTH.GDBIntegrator.Config/*.csproj ./src/OpenFTTH.GDBIntegrator.Config/
COPY ./src/OpenFTTH.GDBIntegrator.RouteNetwork/*.csproj ./src/OpenFTTH.GDBIntegrator.RouteNetwork/
COPY ./src/OpenFTTH.GDBIntegrator.Subscriber/*.csproj ./src/OpenFTTH.GDBIntegrator.Subscriber/
COPY ./src/OpenFTTH.GDBIntegrator.Producer/*.csproj ./src/OpenFTTH.GDBIntegrator.Producer/
COPY ./src/OpenFTTH.GDBIntegrator.GeoDatabase/*.csproj ./src/OpenFTTH.GDBIntegrator.GeoDatabase/
COPY ./src/OpenFTTH.GDBIntegrator.Integrator/*.csproj ./src/OpenFTTH.GDBIntegrator.Integrator/

COPY ./test/OpenFTTH.GDBIntegrator.Tests/*.csproj ./test/OpenFTTH.GDBIntegrator.Tests/
COPY ./test/OpenFTTH.GDBIntegrator.Config.Tests/*.csproj ./test/OpenFTTH.GDBIntegrator.Config.Tests/
COPY ./test/OpenFTTH.GDBIntegrator.RouteNetwork.Tests/*.csproj ./test/OpenFTTH.GDBIntegrator.RouteNetwork.Tests/
COPY ./test/OpenFTTH.GDBIntegrator.Subscriber.Tests/*.csproj ./test/OpenFTTH.GDBIntegrator.Subscriber.Tests/
COPY ./test/OpenFTTH.GDBIntegrator.Producer.Tests/*.csproj ./test/OpenFTTH.GDBIntegrator.Producer.Tests/
COPY ./test/OpenFTTH.GDBIntegrator.GeoDatabase.Tests/*.csproj ./test/OpenFTTH.GDBIntegrator.GeoDatabase.Tests/
COPY ./test/OpenFTTH.GDBIntegrator.Integrator.Tests/*.csproj ./test/OpenFTTH.GDBIntegrator.Integrator.Tests/

RUN dotnet restore --packages ./packages

COPY . ./
WORKDIR /app/src/OpenFTTH.GDBIntegrator
RUN dotnet publish -c Release -o out
RUN dotnet publish -c Release -o out --packages ./packages

# Build runtime image
FROM mcr.microsoft.com/dotnet/core/runtime:3.1.8-alpine3.12
FROM mcr.microsoft.com/dotnet/core/runtime:3.1
WORKDIR /app

COPY --from=build-env /app/src/OpenFTTH.GDBIntegrator/out .
Expand Down

0 comments on commit c40c6df

Please sign in to comment.