How to scale a particular service to ‘x' containers?

0 votes
I have created a docker compose file and after using docker compose up command I have successfully created the containers.

I want it to scale my services up to 5 containers. How do I scale it?

Is there any simple command for the scaling of services?

Can anyone help me with this?

Thanks.
Mar 5 in DevOps & Agile by Shubham
• 1,000 points

edited Mar 5 by Shubham 16 views

1 answer to this question.

0 votes

I think I can help you with this query. Here is what you can try, to resolve it.

There is a command to scale your services and I think it will do the job.

Try using:

docker-compose scale=n     

where n is the no. of containers up to which you want to scale your services.

I hope it helps.

answered Mar 5 by Damon Salvatore
• 5,490 points

Related Questions In DevOps & Agile

+1 vote
2 answers

How do I run Apache server from Docker without mapping to a location?

If you're seeing a 500 error, that's ...READ MORE

answered Oct 18, 2018 in DevOps & Agile by lina
• 8,100 points
60 views
0 votes
1 answer

How to set up a VM with KVM/qemu without VitualBox using Vagrant

Start the vagrant box using: vagrant up --provider=kvm But ...READ MORE

answered Apr 11, 2018 in DevOps & Agile by ajs3033
• 7,240 points
358 views
0 votes
1 answer

Upgrading a service leads to Rancher losing persistence of environment variables

when you upgrade, what it will do ...READ MORE

answered Apr 27, 2018 in DevOps & Agile by shubham
• 6,870 points
73 views
0 votes
1 answer

How to get remote access to a private docker-registry?

New client version refuses to work with ...READ MORE

answered Jul 31, 2018 in DevOps & Agile by Kalgi
• 37,320 points
66 views
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 56,160 points
99 views
0 votes
1 answer

How to edit file after I shell to a docker container?

Since docker images are trimmed to bare minimum ...READ MORE

answered Sep 11, 2018 in DevOps & Agile by Damon Salvatore
• 5,490 points
50 views
0 votes
1 answer