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 +