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
• 19,610 points
1,341 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
• 59,230 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
1,527 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
• 59,230 points
670 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
• 59,230 points
661 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
• 58,020 points
2,731 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
2,098 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
1,034 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP