second-state / microservice-rust-mysql

A template project for building a database-driven microservice in Rust and run it in the WasmEdge sandbox.
Apache License 2.0
345 stars 53 forks source link

operating system is not supported #11

Open sunwu51 opened 1 year ago

sunwu51 commented 1 year ago

Ubuntu x86_64, running docker compose up got a msg operating system is not supported

$ uname -a
Linux 5.4.0-126-generic #142-Ubuntu SMP Fri Aug 26 12:12:57 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
 => [build 1/4] COPY Cargo.toml orders.json update_order.json .                                                                                          0.0s
 => [build 2/4] COPY src ./src                                                                                                                           0.0s
 => [build 3/4] RUN --mount=type=cache,target=/usr/local/cargo/git/db     --mount=type=cache,target=/usr/local/cargo/registry/cache     --mount=type=c  68.5s
 => [build 4/4] RUN /root/.wasmedge/bin/wasmedgec target/wasm32-wasi/release/order_demo_service.wasm order_demo_service.wasm                            66.8s
 => [stage-2 1/1] COPY --link --from=build /src/order_demo_service.wasm /order_demo_service.wasm                                                         0.0s
 => ERROR exporting to image                                                                                                                             0.1s
 => => exporting layers                                                                                                                                  0.1s
 => => writing image sha256:8139f0063222ee1099fe0d240389b13757f2257b6a00911221bea050565351f2                                                             0.0s
------
 > exporting to image:
------
failed to solve: operating system is not supported
SAtacker commented 1 year ago

This is because platform option is not getting passed it was removed in docker compose v3. Ref - https://github.com/docker/compose/pull/5985 https://devblogs.microsoft.com/premier-developer/mixing-windows-and-linux-containers-with-docker-compose/ I think we might need to fix the BUILDPLATFORM argument. Also it is claimed that docker-compose is supposed to be used and not docker compose CC @juntao

hydai commented 1 year ago

Hi @sunwu51 Could you please provide the output of docker version and docker info?

I am using docker desktop on macOS and docker on Linux with the same command, docker compose up, and it works without issues. I am wondering if this issue may be related to the docker version.

t00350320 commented 10 months ago

for me, 1、install docker desktop , https://docs.docker.com/desktop/install/linux-install/ docker-desktop-4.24.2-amd64.deb 2、enable wasm https://wasmedge.org/docs/start/build-and-run/docker_wasm/ this issue disappears