Docker with Puppet: Configuring Health checks periodically on an unhealthy Docker container.

0 votes
I have an unhealthy docker container that I wish to restart and also configure health check interval every 20 seconds? How do I go about doing this?
Aug 16 in Puppet by Karan
• 6,060 points
44 views

1 answer to this question.

0 votes

To enable the restart of an unhealthy container, add the following code to the manifest file.

 In order to set the health check interval time set the optional health_check_interval parameter, the default health check interval is 30 seconds.

docker::run { 'helloworld':
  image => 'base',
  command => 'command',
  health_check_cmd => '<command_to_execute_to_check_your_containers_health>',
  restart_on_unhealthy => true,
  health_check_interval => '<time between running docker healthcheck>', //in your case 20 sec. 
  -----
}
answered Aug 16 by Sirajul
• 39,540 points

Related Questions In Puppet

0 votes
1 answer

Is it possible to install puppet agent in a docker container on linux?

Hey @Janice, this is pretty simple. Create ...READ MORE

answered Mar 12 in Puppet by Jason
183 views
0 votes
1 answer

Why focus on Container management with puppet?

As with any other IT endeavor, your ...READ MORE

answered Aug 16 in Puppet by Sirajul
• 39,540 points
20 views
0 votes
1 answer

Docker with Puppet: How do I install Docker EE on a Debian System?

Docker provides a enterprise addition of the ...READ MORE

answered Aug 16 in Puppet by Sirajul
• 39,540 points
37 views
0 votes
1 answer
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,940 points
234 views
0 votes
0 answers

Puppet+Docker: pull an image and launch a container

I am experimenting on integrating a containerization ...READ MORE

Aug 13 in Puppet by Sam
• 4,320 points
124 views
0 votes
0 answers

Puppet+Docker: Rebuild an image with respect to changes in dockerfile

I am building a docker image via ...READ MORE

Aug 13 in Puppet by Sam
• 4,320 points
25 views