Skip to content

Commit

Permalink
fix: fix binary file path
Browse files Browse the repository at this point in the history
  • Loading branch information
mauricioromagnollo committed Oct 12, 2023
1 parent f7c69ad commit ed6b568
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM golang:1.20.6 as builder
FROM golang:1.20.6 AS builder
WORKDIR /app
COPY . .
RUN GOOS=linux go build -ldflags="-w -s" -o bin/api cmd/api/main.go
RUN GOOS=linux go build -ldflags="-w -s" -o api cmd/api/main.go

FROM scratch
COPY --from=builder /app/bin/api .
FROM golang:1.20.6 AS final
WORKDIR /
COPY --from=builder /app/api .
EXPOSE 8080
CMD [ "./api" ]
ENTRYPOINT ["/api"]

0 comments on commit ed6b568

Please sign in to comment.