Skip to content

Commit 465d44f

Browse files
committed
build(Dockerfile): build for correct platform inside image
1 parent cd47c0d commit 465d44f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ RUN apk add --no-cache build-base
1212
RUN go mod download
1313

1414
# Build the binary
15-
RUN go build --ldflags "-s -w" -o bin/spirit -tags sqlite ./cmd/spirit/main.go
15+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build --ldflags "-s -w" -o bin/spirit -tags sqlite ./cmd/spirit/main.go
1616

1717
# Run the generated binary
1818
CMD ["/opt/spirit/bin/spirit"]

0 commit comments

Comments
 (0)