From 60c46865d46c1fd511cff3a2ff72176df3d010e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A1n=20Del=20Valle?= Date: Wed, 24 Nov 2021 14:01:29 -0800 Subject: [PATCH] Reduces stream image complexity to just loading the binary into the iamge and setting an entrypoint. --- stream/Dockerfile | 28 ++++++---------------------- 1 file changed, 6 insertions(+), 22 deletions(-) diff --git a/stream/Dockerfile b/stream/Dockerfile index 5144213..e8c9177 100644 --- a/stream/Dockerfile +++ b/stream/Dockerfile @@ -1,23 +1,7 @@ -#Build from golang alpine as base image and add build base -FROM golang:1.16.0-alpine3.13 as golangbase -RUN apk add build-base +FROM alpine +LABEL maintainer="PayPal" +LABEL description="Katbox Stream" -LABEL maintainer="The Katbox Authors" - -WORKDIR /app -# Copy the source from the current directory to the Working Directory inside the container -COPY . . -RUN go mod download - -RUN go build -o main . - -#Start a new stage from scratch (multistage build) -FROM alpine:latest -RUN apk --no-cache add ca-certificates -WORKDIR /root/ - -# Copy the Pre-built binary file from the previous stage -COPY --from=golangbase /app/main . -#TODO:@revanth this port needs to updated before deploying on the cluster if needed -EXPOSE 5051 -CMD ["./main"] +RUN apk add util-linux +COPY ./bin/katbox-stream /katbox-stream +ENTRYPOINT ["/katbox-stream"]