Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

docker-tools

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docker-tools - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

.editorconfig

44

index.js

@@ -1,40 +0,8 @@

var when = require('when');
var findNecessaryContainers = require('./lib/findNecessaryContainers');
var createContainer = require('./lib/createContainer');
function resolveConfigurationAndStartContainers (config, callback) {
if (!config.docker || !config.docker.enabled) {
return callback(null, config);
module.exports = {
get resolveConfigurationAndStartContainers () {
return require('./lib/resolveConfigurationAndStartContainers');
},
get DockerContainer () {
return require('./lib/Container')
}
var containers = findNecessaryContainers(config);
if (containers.length === 0) {
return callback(null, config);
}
when.map(containers, function (containerSpec) {
return createContainer(config.docker.options, containerSpec);
}).then(function (containers) {
containers.forEach(function (container) {
var configKey = container.containerSpec.key;
var newValue = container.containerSpec.value;
for (var prop in newValue) {
var value = newValue[prop];
if (newValue.hasOwnProperty(prop) && typeof value === 'string') {
value = value.replace(/\{docker_port\}/g, container.info.port);
value = value.replace(/\{docker_host\}/g, container.info.ip);
newValue[prop] = value.replace(/\{docker_env:([a-zA-Z_]+)\}/g, function (match, key) {
return container.containerSpec.docker.env[key];
});
}
}
config[configKey] = newValue;
});
callback(null, config);
}, callback);
};
module.exports = resolveConfigurationAndStartContainers;
{
"name": "docker-tools",
"description": "Tools for working with Docker containers in Node.js.",
"version": "0.0.1",
"version": "0.0.2",
"main": "index.js",

@@ -6,0 +6,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc