-
Notifications
You must be signed in to change notification settings - Fork 299
Description
Okay, I know this sounds weird ... but: The SwaggerUI is not working inside of Docker. ^^"
Let me explain what I did. When I write down everything like in the example for axum
and I start the application with cargo run
, I can see the swagger-ui
and also see the /docs/openapi.json
file.
Now the interesting part, when I compile the code inside docker and provide it inside docker only the swagger-ui
endpoint (/docs
in this example) is returning a 404 Not Found
. But the interesting thing is, all other endpoints are working... Including the /docs/opanapi.json
endpoint.
So, only the swagger-ui
isn't working inside Docker. ^^"
I thought "maybe it's a compiled problem", so I copied the locally build binary (which worked on the machine and showed the swagger-ui) into the docker container, started it and "boom", no swagger-ui. ^^"
It's so weird that every endpoint is working, also the openapi.json
endpoint (which shows the full generated openapi json), but only the swagger-ui
HTML-Page is not working. There is really no difference inside the Docker container and my local machine (like I said, I copied the binary to prove my assumption).
I also tried bigger OS containers like ubuntu
and smaller ones like alpine
, in all containers every endpoint is working, except the swagger-ui
. :(
Does someone have an idea what I could test/think of? I'm getting out of ideas. ^^"