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, 2019 in Puppet by Karan
• 16,250 points
403 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, 2019 by Sirajul
• 57,940 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, 2019 in Puppet by Jason
485 views
0 votes
1 answer

Why focus on Container management with puppet?

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

answered Aug 16, 2019 in Puppet by Sirajul
• 57,940 points
69 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, 2019 in Puppet by Sirajul
• 57,940 points
90 views
0 votes
1 answer
+2 votes
1 answer
+2 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
• 57,640 points
777 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, 2019 in Puppet by Sam
• 6,260 points
530 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, 2019 in Puppet by Sam
• 6,260 points
257 views