Skip to content

Commit

Permalink
update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
pwnfoo committed Jul 3, 2024
1 parent 30ea4dd commit 590df2a
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions Dockerfile
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"]

0 comments on commit 590df2a

Please sign in to comment.