From 810a74a463f971fd90c8b5d9d53a1362dd568775 Mon Sep 17 00:00:00 2001 From: Ahmet Alp Balkan Date: Tue, 19 Jun 2018 23:04:28 -0700 Subject: [PATCH] productcatalogservice: add Dockerfile Signed-off-by: Ahmet Alp Balkan --- src/productcatalogservice/Dockerfile | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/productcatalogservice/Dockerfile diff --git a/src/productcatalogservice/Dockerfile b/src/productcatalogservice/Dockerfile new file mode 100644 index 0000000..245dfe3 --- /dev/null +++ b/src/productcatalogservice/Dockerfile @@ -0,0 +1,16 @@ +FROM golang:1.10-alpine as builder +RUN apk add --no-cache \ + ca-certificates \ + git +WORKDIR /src/microservices-demo/productcatalogservice +COPY . . +RUN go get -d ./... +RUN go build -v -o /productcatalogservice . + +FROM alpine as release +RUN apk add --no-cache \ + ca-certificates +COPY --from=builder /productcatalogservice /productcatalogservice +EXPOSE 3550 +ENTRYPOINT /productcatalogservice +