-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
FROM golang:1.21 AS builder | ||
RUN apt update && apt install make git | ||
# Use the same architecture for the builder and the final image | ||
FROM --platform=linux/arm64 golang:1.21-bookworm AS builder | ||
|
||
RUN apt update && apt install make git -y | ||
WORKDIR /callisto | ||
|
||
COPY . ./ | ||
RUN cat go.mod | grep -i wasm | ||
RUN go mod tidy && go mod vendor | ||
RUN go mod tidy && go mod download | ||
RUN make build | ||
|
||
FROM alpine:latest | ||
WORKDIR /callisto | ||
COPY --from=builder /callisto/build/callisto /usr/bin/callisto | ||
CMD [ "callisto" ] | ||
FROM --platform=linux/arm64 debian:bookworm | ||
WORKDIR /root | ||
RUN apt-get update && apt-get install ca-certificates -y | ||
|
||
COPY --from=builder /go/pkg/mod/github.com/!cosm!wasm/wasmvm/[email protected]/internal/api/libwasmvm.aarch64.so /root | ||
COPY --from=builder /callisto/build/callisto /root/callisto | ||
|
||
ENV LD_LIBRARY_PATH=/root:$LD_LIBRARY_PATH | ||
CMD ["./callisto"] |