From 977c2e5ffd0dcf62b28316dd50a0fa5c315a41ec Mon Sep 17 00:00:00 2001 From: Ahmet Alp Balkan Date: Thu, 28 Jun 2018 21:45:57 -0700 Subject: [PATCH] cartservice: dockerfile optimizations Signed-off-by: Ahmet Alp Balkan --- src/cartservice/Dockerfile | 12 ++++++------ src/frontend/Dockerfile | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/cartservice/Dockerfile b/src/cartservice/Dockerfile index 0180d29..5440770 100644 --- a/src/cartservice/Dockerfile +++ b/src/cartservice/Dockerfile @@ -1,9 +1,9 @@ FROM gcr.io/google-appengine/aspnetcore:2.1.0 -COPY . /app -WORKDIR /app -RUN dotnet restore -RUN dotnet build -RUN dotnet publish -WORKDIR /app/bin/Debug/netcoreapp2.0 RUN apt update && apt install net-tools telnet +WORKDIR /app +COPY . . +RUN dotnet restore && \ + dotnet build \ + dotnet publish +WORKDIR /app/bin/Debug/netcoreapp2.0 ENTRYPOINT ["dotnet", "cartservice.dll", "start"] diff --git a/src/frontend/Dockerfile b/src/frontend/Dockerfile index 4b48d10..d3271fe 100644 --- a/src/frontend/Dockerfile +++ b/src/frontend/Dockerfile @@ -5,6 +5,7 @@ WORKDIR /go/src/frontend # fetch known dependencies for caching RUN go get -d github.com/google/uuid \ github.com/gorilla/mux \ + github.com/pkg/errors \ google.golang.org/grpc \ google.golang.org/grpc/codes \ google.golang.org/grpc/status