Skip to content

Commit

Permalink
Fix Dockerfile used for local development (#43)
Browse files Browse the repository at this point in the history
Signed-off-by: Leonardo Luz Almeida <[email protected]>
  • Loading branch information
leoluz authored Jun 14, 2023
1 parent 60cb1dd commit 68f2063
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]

0 comments on commit 68f2063

Please sign in to comment.