🐛 Fix docker not getting all containers

Turned off containers will not be shown
This commit is contained in:
Thomas "ajnart" Camlong
2022-07-22 13:17:17 +02:00
parent 8eac0bed84
commit cd9e844001

View File

@@ -5,7 +5,7 @@ import Docker from 'dockerode';
async function Get(req: NextApiRequest, res: NextApiResponse) { async function Get(req: NextApiRequest, res: NextApiResponse) {
try { try {
const docker = new Docker(); const docker = new Docker();
const containers = await docker.listContainers(); const containers = await docker.listContainers({ all: true });
res.status(200).json(containers); res.status(200).json(containers);
} catch (err) { } catch (err) {
res.status(500).json({ err }); res.status(500).json({ err });