I need to start multiple containers for the same image. If i create my compose file as shown below, it works fine.
version: \'2\'
services:
app01:
im
You can do it with replica
as mentioned in https://docs.docker.com/compose/compose-file/#replicas
version: '3'
services:
worker:
image: dockersamples/examplevotingapp_worker
networks:
- frontend
- backend
deploy:
mode: replicated
replicas: 6
Edit (from the comments): One can use docker-compose --compatibility up
to make docker accept deploy section without using swarm.