Open fanspace opened 1 year ago
Hi @fanspace Please update to the latest docker-desktop and try again.
And you will need an extra flag to workaround an issue: https://github.com/second-state/microservice-rust-mysql/commit/ac7bbed4db49ebdd18c044e4d3bdf6c51eebefa4
Then, docker compose up
I do it like this
I can not build the container either. Even after using docker desktop with the containerd and wasm features enabled and using the correct env variable I get issues with either the container hanging when trying to build (and unable to cancel) or error response from the daemon: failed to create container: unknown.
any ideas here?
Hi @rphuber Could you please try the latest master branch with the latest docker desktop? We fixed a DNS nameserver issue just a few hours ago.
docker desktop version :
D:\gitpro\microservice-rust-mysql>docker compose up [+] Running 1/1 ! server Warning 21.0s [+] Building 15.8s (6/6) FINISHED => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 1.08kB 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => resolve image config for docker.io/docker/dockerfile:1 15.4s => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:42399d4635eddd7a9b8a24be879d2f9a930d0ed040a61324cf 0.0s => [internal] load .dockerignore 0.0s => [internal] load build definition from Dockerfile 0.0s failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: rpc error: code = Unknown desc = dockerfile parse error on line 6: unknown instruction: set (did you mean user?)
it works after modify like below
`FROM --platform=$BUILDPLATFORM rust:1.64 AS buildbase WORKDIR /src RUN apt-get update && apt-get install -y \ git \ clang \ && rustup target add wasm32-wasi
RUN curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash
FROM buildbase AS build COPY Cargo.toml orders.json update_order.json . COPY src ./src
RUN --mount=type=cache,target=/usr/local/cargo/git/db \ --mount=type=cache,target=/usr/local/cargo/registry/cache \ --mount=type=cache,target=/usr/local/cargo/registry/index \ cargo build --target wasm32-wasi --release
RUN /root/.wasmedge/bin/wasmedgec target/wasm32-wasi/release/order_demo_service.wasm order_demo_service.wasm
FROM scratch ENTRYPOINT [ "order_demo_service.wasm" ] COPY --from=build /src/order_demo_service.wasm /order_demo_service.wasm`