Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
@runnable/loki
Advanced tools
Runnable Docker/Swarm client library with batteries.
stopContainer
, logContainer
etcclient
propertyYou can use loki Docker client Promisified extra container functions like this:
const Docker = require('loki').Docker
const dockerClient = new Docker({ host: 'https://127.0.0.1:4242'})
dockerClient.stopContainerAsync('71501a8ab0f8')
.then(function () {
console.log('container stopped')
})
.catch(function (err) {
console.log('container failed to stop', err)
})
You can use loki Dockerode client methods like this:
const Docker = require('loki').Docker
const dockerClient = new Docker({ host: 'https://127.0.0.1:4242'})
dockerClient.getContainer('71501a8ab0f8')
.stop(function (err) {
if (err) {
return console.log('container failed to stop', err)
}
console.log('container stopped')
})
You can use loki Dockerode promisified methods directly like this:
const Docker = require('loki').Docker
const dockerClient = new Docker({ host: 'https://127.0.0.1:4242'})
dockerClient.listConatinersAsync('71501a8ab0f8')
.then(function (containers) {
console.log('found containers')
})
You can extend loki Docker client with your app specific functions:
const Docker = require('loki').Docker
class MyDocker extends Docker {
}
const myDocker = new MyDocker()
dockerClient.stopContainerAsync('71501a8ab0f8')
.then(function () {
console.log('container stopped')
})
.catch(function (err) {
console.log('container failed to stop', err)
})
Every Loki client include utility Promise-based functions to deal with containers.
E.x. instead of this code
const Docker = require('loki').Docker
const dockerClient = new Docker({ host: 'https://127.0.0.1:4242'})
dockerClient.getContainer('71501a8ab0f8')
.stop(function (err) {
console.log('stopped container?', err)
})
You can do the following
const Docker = require('loki').Docker
const dockerClient = new Docker({ host: 'https://127.0.0.1:4242'})
dockerClient.stopContainerAsync('71501a8ab0f8')
.then(function () {
console.log('container was stopped')
})
Async
suffix.Async
suffix.FAQs
Runnable Docker/Swarm library with batteries
We found that @runnable/loki demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.