mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-20 00:23:03 +00:00
committed by
Rainer Killinger
parent
8f10626e52
commit
b3ee587831
17
src/main.ts
17
src/main.ts
@@ -1,3 +1,18 @@
|
||||
/*
|
||||
* Copyright (C) 2019 StApps
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
import * as config from 'config';
|
||||
import * as Dockerode from 'dockerode';
|
||||
import {existsSync, readFile} from 'fs-extra';
|
||||
@@ -176,7 +191,7 @@ export async function getTemplateView(containers: Dockerode.ContainerInfo[]): Pr
|
||||
|
||||
/**
|
||||
* Read the list of docker containers
|
||||
* @param pathToDockerSocket
|
||||
* @param pathToDockerSocket
|
||||
*/
|
||||
export async function getContainers(pathToDockerSocket = '/var/run/docker.sock'): Promise<Dockerode.ContainerInfo[]> {
|
||||
const docker = new Dockerode({
|
||||
|
||||
Reference in New Issue
Block a user