Skip to content

Commit

Permalink
Merge pull request #3 from sotchenkov/patch/dockerfile
Browse files Browse the repository at this point in the history
multi-stage building
  • Loading branch information
sotchenkov authored Apr 8, 2024
2 parents 44acc52 + c41bdc6 commit 28dba7b
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
FROM golang:alpine
FROM golang:1.22 as builder

WORKDIR /app

COPY . .
RUN go mod download

ENV CGO_ENABLED 0
ENV GOOS linux

RUN go mod download
RUN go build -o limero ./cmd/limero/main.go

EXPOSE 7920

ENTRYPOINT [ "/app/limero" ]
FROM alpine:3.19

WORKDIR /app
COPY --from=builder /app/limero .

EXPOSE 7920

ENTRYPOINT [ "/app/limero" ]

0 comments on commit 28dba7b

Please sign in to comment.