Presenting docket dtates inside html page by javascript

0 votes
How can I GET and present web services states inside HTML dashboard using javascript? Like If docker is stopped, I wan tit to show a red icon, if the response it taking a lot of time then yellow and so on. Please help!
Jun 20, 2018 in Docker by Damon Salvatore
• 5,980 points
761 views

1 answer to this question.

0 votes

Use the Docker Engine Api:Docker Engine API (v1.26)

And you can use GET/container/json will give you the details in json.

function getContainers(callback) {
    $.ajax({
        type: 'GET',
        url:  '/containers/json?all=1',
        dataType: 'json',
        success: function(data)
        {
          if( callback ) callback(data);
        },
        error: function(err)
        {
          // ...
        },
        timeout: 30000
    });
}

answered Jun 20, 2018 by DareDev
• 6,890 points

Related Questions In Docker

0 votes
1 answer

Different file owner inside Docker container and in host machine Ask

Filesystems, at least in Unix- and Linux-like ...READ MORE

answered Jun 25, 2018 in Docker by Damon Salvatore
• 5,980 points
963 views
0 votes
1 answer

Different file owner inside Docker container and in host machine

Here is what you can try. Since ...READ MORE

answered Jun 27, 2018 in Docker by Atul
• 10,240 points
1,955 views
0 votes
1 answer

How to run a docker command from inside the container?

You must have come across the /var/run/docker.sock file, ...READ MORE

answered Jun 28, 2018 in Docker by Sophie may
• 10,620 points
3,548 views
+1 vote
5 answers

Set containers timezones by using docker compose.

version "2" services: serviceA: ...READ MORE

answered Jul 9, 2018 in Docker by Atul
• 10,240 points
23,587 views
0 votes
1 answer
0 votes
1 answer

Using SSH keys inside docker container

Turns out when using Ubuntu, the ssh_config ...READ MORE

answered Jul 18, 2018 in Docker by Nilesh
• 7,060 points
12,687 views
+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,738 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