Yep. That’s where docker compose comes in. It takes care of the whole process of linking together different docker containers as well as configuration of each of them (such as env vars).
Helm is the closest thing to a package manager for Docker, but it targets Kubernetes, not vanilla Docker (and k8s is overkill for a single server, at least considering the time/expertise required to stand up a productionized k8s installation).