Joao Ferreira
Joao Ferreira

Reputation: 1

Lanch new Docker image when memory limit is reached

Sorry if this is a dumb question but i'm quite new to Docker.

I understand that, if a the --memory parameter is set and the container uses all the memory, Docker will kill the container if the container.

I wonder if it's possible to create a new container (without killing the previous one) when the container reaches a certain memory limit defined by me.

Upvotes: 0

Views: 87

Answers (1)

Chris Becke
Chris Becke

Reputation: 36016

docker does not have built in service scaling.

most implementations ive seen for docker that do this use:

  • prometheus, a monitoring server that can scrape docker container metrics.
  • alertmanager, a server that, given metrics to monitor on a prometheus server, can raise alerts when thresholds are reached.
  • a custom piece of code using the docker golang sdk that increases or decreases the number of service replicas in response to alert thresholds.

Upvotes: 0

Related Questions