I think you forgot to mention the error message, but your compose is definitely not supported anymore. Use Docker Compose v2 as recommended in the documentation.
Also, please, when you share coe or error messages, follow our formatting guide and use code blocks: