Developing and Testing Server-Side Swift with Docker and Vapor | raywenderlich.com

Use Docker to develop and test your Vapor apps and learn to use Docker Compose to run different services, which include a database.


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/26322368-developing-and-testing-server-side-swift-with-docker-and-vapor

Thank you for the tutorial, it was very useful for me.
Here is a question, when I use M1 Mac to run docker build, it prompts some errors:

[+] Building 3.6s (4/4) FINISHED                                                              
 => [internal] load build definition from Dockerfile                                     0.0s
 => => transferring dockerfile: 37B                                                      0.0s
 => [internal] load .dockerignore                                                        0.0s
 => => transferring context: 2B                                                          0.0s
 => ERROR [internal] load metadata for docker.io/library/swift:latest                    3.5s
 => [auth] library/swift:pull token for registry-1.docker.io                             0.0s
------
 > [internal] load metadata for docker.io/library/swift:latest:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:b852e93d61a7b187904a2bdc6bfa6b93a657b5d95ca9ff63f94d0a0e449c69af: not found

I wonder if you can answer it, Iā€™d really appreciate the help.