18 lines
No EOL
382 B
JavaScript
18 lines
No EOL
382 B
JavaScript
var express = require('express');
|
|
var router = express.Router();
|
|
var docker = require('../bin/dockerode')
|
|
|
|
|
|
router.get('/', function (req, res, next) {
|
|
|
|
res.send(getContainer('Portainer'));
|
|
});
|
|
|
|
module.exports = router;
|
|
|
|
function getContainer(containername) {
|
|
var container = docker.getContainer(containername);
|
|
container.inspect(function (err, data) {
|
|
return data
|
|
});
|
|
} |