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
• 980 points

edited Mar 5 by Shubham 16 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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,450 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
54 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,080 points
322 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,560 points
66 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
• 36,340 points
59 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,140 points
80 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,450 points
47 views
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.