DockerRestApi/routes/start.js
2019-09-19 18:27:24 +02:00

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
});
}