Skip to content

Commit

Permalink
Merge pull request #6 from NibiruChain/fix/dockerfile/avoid-arm-arch
Browse files Browse the repository at this point in the history
chore: dockerfile optimisations
  • Loading branch information
mmntk authored Apr 23, 2024
2 parents a862592 + 3fb3bc9 commit 72db8a8
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
FROM golang:1.21 AS builder
FROM golang:1.21-alpine AS builder

WORKDIR /app
COPY go.sum go.mod ./
RUN go mod download
COPY . .
RUN go mod tidy
ENV CGO_ENABLED=0 GOOS=linux GOARCH=arm64
RUN go build -o compounder ./cmd/main.go
RUN chmod +x compounder
RUN CGO_ENABLED=0 go build -o compounder ./cmd/main.go

FROM alpine:latest
WORKDIR /app
FROM gcr.io/distroless/static
WORKDIR /
COPY --from=builder /app/compounder .
CMD ["./compounder"]
CMD ["/compounder"]

0 comments on commit 72db8a8

Please sign in to comment.