Skip to content

Commit

Permalink
fix: dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
bookpanda committed Jun 22, 2024
1 parent 28bbc5b commit ff1cb1a
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM golang:1.22.4-alpine3.20 as builder
WORKDIR /app

COPY go.mod go.sum ./

RUN go mod download

COPY . .

RUN go build -o server ./cmd/main.go


FROM alpine AS runner
WORKDIR /app

COPY --from=builder /app/server ./

ENV GO_ENV production

EXPOSE 3000

CMD ["./server"]

0 comments on commit ff1cb1a

Please sign in to comment.