dotnet user-jwts create command introduced in .NET 7 preview 5 is very useful to create JWT tokens on a development machine. It works fine when I test the application locally but unfortunately it doesn’t work when I run the project in a docker container and I cannot run the above command to generate a JWT token on the docker container since it doesn’t have .NET SDK installed on it. I can install .NET SDK on the final image to bash to the container and get a JWT token but this is not an optimal solution.
Does anyone know a way to generate a JWT token when developing applications with a docker container?