Skip to content

Commit

Permalink
Using Docker within Docker to reduce image footprint (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb authored Jun 26, 2019
1 parent a5b388c commit 7872551
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
12 changes: 10 additions & 2 deletions src/Lighthouse/Dockerfile-linux
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ ENV CLUSTER_SEEDS "[]"
ENV CLUSTER_IP ""
ENV CLUSTER_PORT "4053"

COPY ./bin/Release/netcoreapp2.1/publish/ /app

# 9110 - Petabridge.Cmd
# 4053 - Akka.Cluster
EXPOSE 9110 4053
Expand All @@ -21,4 +19,14 @@ ENV PATH="${PATH}:/root/.dotnet/tools"

# RUN pbm help

COPY ./bin/Release/netcoreapp2.1/publish/ /app

FROM mcr.microsoft.com/dotnet/core/runtime:2.1 AS app
WORKDIR /app

COPY --from=base /app /app

# copy .NET Core global tool
COPY --from=base /root/.dotnet /root/.dotnet/

CMD ["dotnet", "Lighthouse.dll"]
12 changes: 10 additions & 2 deletions src/Lighthouse/Dockerfile-windows
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ ENV CLUSTER_SEEDS "[]"
ENV CLUSTER_IP ""
ENV CLUSTER_PORT "4053"

COPY ./bin/Release/netcoreapp2.1/publish/ /app

# 9110 - Petabridge.Cmd
# 4053 - Akka.Cluster
EXPOSE 9110 4053
Expand All @@ -21,4 +19,14 @@ EXPOSE 9110 4053

# RUN pbm help

COPY ./bin/Release/netcoreapp2.1/publish/ /app

FROM mcr.microsoft.com/dotnet/core/runtime:2.1-nanoserver-1803 AS app
WORKDIR /app

COPY --from=base /app /app

# copy .NET Core global tool
# COPY --from=base /root/.dotnet /root/.dotnet/

CMD ["dotnet", "Lighthouse.dll"]

0 comments on commit 7872551

Please sign in to comment.