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

Dockerfile build: unknown flag: link #15

Closed dierbei closed 1 year ago

dierbei commented 1 year ago

image

I tried to build a image using Dockerfile and got this error.

dierbei commented 1 year ago

I think adding a .dockerignore file might build better.

hydai commented 1 year ago

Please use buildx to build the docker image:

docker buildx build -t wasm:1636 .
dierbei commented 1 year ago

Please use buildx to build the docker image:

docker buildx build -t wasm:1636 .

Thanks, I solved the problem of building

dierbei commented 1 year ago

Another problem: image

hydai commented 1 year ago

According to the docker-compose file, you will need to specify the platform to run it. Ref: https://github.com/second-state/microservice-rust-mysql/blob/main/docker-compose.yml#L10

dierbei commented 1 year ago

According to the docker-compose file, you will need to specify the platform to run it. Ref: https://github.com/second-state/microservice-rust-mysql/blob/main/docker-compose.yml#L10

You are right, but I have a problem when running.

image

I try to specify the architecture when building.

image

dierbei commented 1 year ago

My operating system is Ubuntu.

hydai commented 1 year ago

Have you installed the wasm-enabled runtime bundled docker, such as docker-desktop?

Also, you have to add an extra flag: export BUILDX_NO_DEFAULT_ATTESTATIONS=1 Ref: https://github.com/second-state/microservice-rust-mysql/commit/ac7bbed4db49ebdd18c044e4d3bdf6c51eebefa4

dierbei commented 1 year ago

Have you installed the wasm-enabled runtime bundled docker, such as docker-desktop?

Also, you have to add an extra flag: export BUILDX_NO_DEFAULT_ATTESTATIONS=1 Ref: ac7bbed

Am I supposed to do this right?

image

hydai commented 1 year ago

What's your docker version?

This is mine: CleanShot 2023-06-19 at 16 43 32

CleanShot 2023-06-19 at 16 55 27

dierbei commented 1 year ago

This is mine: image

dierbei commented 1 year ago

docker-desktop

I don't have docker-desktop installed, I only have terminal.

juntao commented 1 year ago

You will need Docker Desktop.

Or

Use the 24.0.0-beta-1 or above of dockerd. You do have to activate the containerd feature, put { "features": [ "containerd-snapshotter": true ] } in /etc/docker/daemon.json).

You can download the build from http://download.docker.com (for debian for example it’s here: https://download.docker.com/linux/debian/dists/bullseye/pool/test/amd64/docker-ce_24.0.0~beta.1-1~debian.11~bullseye_amd64.deb).

dierbei commented 1 year ago

You will need Docker Desktop.

Or

Use the 24.0.0-beta-1 or above of dockerd. You do have to activate the containerd feature, put { "features": [ "containerd-snapshotter": true ] } in /etc/docker/daemon.json).

You can download the build from http://download.docker.com (for debian for example it’s here: https://download.docker.com/linux/debian/dists/bullseye/pool/test/amd64/docker-ce_24.0.0~beta.1-1~debian.11~bullseye_amd64.deb).

Thanks, I'll try it later.

dierbei commented 1 year ago

I built successfully with Docker Desktop on MAXOS, thanks for your help.

dierbei commented 1 year ago

I have another question, is there a web framework that supports wasm better?