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,450 points
20 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
    });
}

You can also refer to links below for more information

How to use docker remote api to create container?

Enable Docker Remote API - raspberry pi / raspbian

https://github.com/tgogos/rpi_docker_ui

answered Jun 20, 2018 by DareDev
• 6,670 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,450 points
44 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,220 points
101 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
• 9,330 points
239 views
+1 vote
5 answers

Set containers timezones by using docker compose.

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

answered Jul 8, 2018 in Docker by Atul
• 10,220 points
1,473 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
• 6,900 points
530 views
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,140 points
79 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.