2

I am running an application that is made up of over eighty micro services, all running in separately composed containers. However they are all based upon the same saved container. This is seems to be eating memory as each container runs in it's own memory space.

Would I be able to make any significant memory gains if I didn't compose each container as a separate image and instead ran the same image multiple times and instead just executed the dockerfile?

thomas-peter
  • 7,738
  • 6
  • 43
  • 58

1 Answers1

0

ran the same image multiple times

You would get the same containers, each one using the same memory as before

instead just executed the dockerfile

You don't "execute a Dockerfile": you use a Dockerfile as configuration of a docker run to build an image.

You might gain memory if you group some of those micro-service together in the same image (ie, at runtime, in a common container).
But you would need a special base image for that (phusion/baseimage-docker), because of the "PID 1 zombie reaping issue".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250