Small Syntax changes for containers API

This commit is contained in:
Neshura 2022-12-10 21:18:55 +01:00
parent 8426640271
commit fff04d019a
No known key found for this signature in database
GPG key ID: ACDF5B6EBECF6B0A

View file

@ -1,11 +1,7 @@
import fsPromises from 'fs/promises' import Docker from 'dockerode'
import path from 'path'
import { Service, ServiceStatus } from '../../interfaces/LinkTypes';
export default async function ServicesAPI(req: any, res: any) { export default async function ContainersAPI(req: any, res: any) {
try { try {
var Docker = require('dockerode');
const options = { const options = {
socketPath: '/var/run/docker.sock', socketPath: '/var/run/docker.sock',
path: '/v1.41/containers/json' path: '/v1.41/containers/json'