Docker Community Forums

Share and learn in the Docker community.

Compose several servers

I have 4 HP DL380Gen9 which i need to make then one and then install on docker on it (i want to use 4 physical servers in one platform ) is it possible to make it with docker?

I don’t think you need multiple swarm clusters, since docker swarm supports ability scheduling service on specific node(s) by one flag.

Add --constraint flag when executing docker service create.

If you are deploying applications with docker compose, then add constraints keyword in compose file.

constraints: [node.hostname == node_server]

Agree with @lewish95 - that’s exactly what Docker Swarm and Kubernetes are designed to do. In essence, you install a master installation then connect to it from other devices. It then becomes responsible for launching containers, distributing the load, and providing a single access point.

I wrote a Docker for Web Developers book and video course which explains how to set up local development environments and clusters. Use the discount code dock30 for 30% off.