Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 546 Bytes

README.md

File metadata and controls

23 lines (15 loc) · 546 Bytes

rust-base-image

A preconfigured base image to build WASI Services

In your Dockerfile

FROM quay.io/knawd/rust-base:TAG as builder

WORKDIR /usr/src/app
COPY . .

# Install production dependencies and build a release artifact.
RUN cargo build --release --target wasm32-wasi

RUN wasmedgec target/wasm32-wasi/release/{{project-naum}}.wasm {{project-naum}}.wasm

FROM scratch

COPY --from=builder /usr/src/app/target/wasm32-wasi/release/{{project-name}}.wasm /

# Run the web service on container startup.
CMD ["/{{project-name}}.wasm"]