Run x86 (Intel) and ARM based images on Apple Silicon (M1) Macs?

That’s an other issue. You made a very common mistake and used --platform linux/amd64 after the image name. Everything after the image name is the parameter of the entrypoint. It will be the part of the command running inside the container. This is why the entrypoint got an “illegal option”. This is the right syntax:

docker run -p 80:8080 --platform linux/amd64 swaggerapi/swagger-ui