-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker-desktop cannot build it #12
Comments
Hi @rphuber |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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`
The text was updated successfully, but these errors were encountered: