Add docker.df

This commit is contained in:
Girish Ramakrishnan
2022-10-11 22:38:26 +02:00
parent 6f61145b01
commit 760301ce02
2 changed files with 31 additions and 0 deletions

View File

@@ -8,6 +8,7 @@ exports = module.exports = {
ping,
info,
df,
downloadImage,
createContainer,
startContainer,
@@ -630,6 +631,12 @@ async function info() {
return result;
}
async function df() {
const [error, result] = await safe(gConnection.df());
if (error) throw new BoxError(BoxError.DOCKER_ERROR, 'Error connecting to docker');
return result;
}
async function update(name, memory, memorySwap) {
assert.strictEqual(typeof name, 'string');
assert.strictEqual(typeof memory, 'number');