From 68f2063a538627f5a49905d66c00b8c711a2f5e1 Mon Sep 17 00:00:00 2001 From: Leonardo Luz Almeida Date: Wed, 14 Jun 2023 14:25:13 -0400 Subject: [PATCH] Fix Dockerfile used for local development (#43) Signed-off-by: Leonardo Luz Almeida --- Dockerfile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index eeb3e59..3eb9007 100644 --- a/Dockerfile +++ b/Dockerfile @@ -30,14 +30,11 @@ COPY . . # It is also a common best practise. # Build the application. -RUN CGO_ENABLED=0 go build -o ./bin/main ./cmd/main.go +RUN CGO_ENABLED=0 go build -o ./bin/metrics-server ./cmd/main.go -# Finally our multi-stage to build a small image # Start a new stage from scratch FROM scratch -# Copy the Pre-built binary file -COPY --from=builder /app/bin/main . +COPY --from=builder /app/bin/metrics-server / -# Run executable -CMD ["./main"] +ENTRYPOINT [ "/metrics-server" ]