Skip to content

Commit

Permalink
Merge pull request #21 from second-state/hydai/bump_rust_image
Browse files Browse the repository at this point in the history
update rust base image
  • Loading branch information
hydai authored Nov 30, 2023
2 parents c411afe + 22d4c13 commit 5776081
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
# syntax=docker/dockerfile:1

FROM --platform=$BUILDPLATFORM rust:1.69 AS buildbase
FROM --platform=$BUILDPLATFORM rust:1.71 AS buildbase
WORKDIR /src
RUN <<EOT bash
set -ex
apt-get update
apt-get install -y \
git \
clang
rustup target add wasm32-wasi
EOT
# This line installs WasmEdge including the AOT compiler
RUN curl -sSf https://github.com/WasmEdge/WasmEdge/master/utils/install.sh | bash

FROM buildbase AS build
COPY Cargo.toml orders.json update_order.json .
COPY src ./src
COPY src ./src
# Build the Wasm binary
RUN cargo build --target wasm32-wasi --release
# This line builds the AOT Wasm binary
RUN /root/.wasmedge/bin/wasmedgec target/wasm32-wasi/release/order_demo_service.wasm order_demo_service.wasm
RUN cp target/wasm32-wasi/release/order_demo_service.wasm order_demo_service.wasm
RUN chmod a+x order_demo_service.wasm

FROM scratch
Expand Down

0 comments on commit 5776081

Please sign in to comment.