Docker only solves the dependency problem for static file dependencies. For things like databases or other services, you still have to stand those up yourself or use another orchestration tool. Beyond that, Docker also puts the onus on the user to solve for networks and volumes and environment variables and secrets management and configuration management.
"Docker" is perhaps part of the solution, but only a very small part.