add libwasmvm and common libraries in fly image (#84)
This commit is contained in:
parent
f4f543fc95
commit
11e1718317
|
@ -6,7 +6,10 @@ WORKDIR /app
|
|||
COPY . .
|
||||
|
||||
# Build the Go app
|
||||
RUN CGO_ENABLED=1 GOOS=linux go build -o "./fly" main.go
|
||||
RUN CGO_ENABLED=1 GOOS=linux go build -o "./fly" main.go && \
|
||||
go get github.com/CosmWasm/wasmvm@v1.0.0 && \
|
||||
cp /go/pkg/mod/github.com/!cosm!wasm/wasmvm@v1.0.0/api/libwasmvm.x86_64.so /usr/lib/
|
||||
|
||||
|
||||
############################
|
||||
# STEP 2 build a small image
|
||||
|
@ -14,7 +17,12 @@ RUN CGO_ENABLED=1 GOOS=linux go build -o "./fly" main.go
|
|||
FROM alpine
|
||||
#Copy certificates
|
||||
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
|
||||
# Copy our static executable.
|
||||
#Copy libraries
|
||||
COPY --from=build /lib/* /lib/
|
||||
COPY --from=build /lib64/* /lib64/
|
||||
COPY --from=build /usr/lib/libwasmvm.x86_64.so /usr/lib/
|
||||
#Copy our static executable.
|
||||
COPY --from=build "/app/fly" "/fly"
|
||||
|
||||
# Run the binary.
|
||||
ENTRYPOINT ["/fly"]
|
||||
|
|
Loading…
Reference in New Issue