Security News
PyPI’s New Archival Feature Closes a Major Security Gap
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
@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
PyPI now allows maintainers to archive projects, improving security and helping users make informed decisions about their dependencies.
Research
Security News
Malicious npm package postcss-optimizer delivers BeaverTail malware, targeting developer systems; similarities to past campaigns suggest a North Korean connection.
Security News
CISA's KEV data is now on GitHub, offering easier access, API integration, commit history tracking, and automated updates for security teams and researchers.