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

dockerode-compose

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dockerode-compose - npm Package Compare versions

Comparing version 1.3.3 to 1.4.0

2

lib/services.js

@@ -174,3 +174,3 @@ const tools = require('./tools');

if (service.networks !== undefined) {
servicesTools.buildNetworks(projectName, serviceName, service.networks, networksToAttach, opts);
servicesTools.buildNetworks(projectName, serviceName, service.networks, networksToAttach, opts, recipe.networks);
} else {

@@ -177,0 +177,0 @@ opts.HostConfig.NetworkMode = projectName + '_default';

@@ -186,3 +186,9 @@ const fs = require('fs');

}
if (service.devices !== undefined) {
output.Devices = service.devices.map((device) => ({
CgroupPermissions: "mrw",
PathInContainer: device,
PathOnHost: device,
}));
}
if (service.cpu_count !== undefined) {

@@ -490,6 +496,15 @@ output.CpuCount = service.cpu_count;

buildNetworks: function (projectName, serviceName, serviceNetworks, networksToAttach, opts) {
buildNetworks: function (projectName, serviceName, serviceNetworks, networksToAttach, opts, toplevelNetworks) {
if (Array.isArray(serviceNetworks)) {
for (let index = 0; index < serviceNetworks.length; index++) {
let networkName = projectName + '_' + serviceNetworks[index];
// check if network is external
if (toplevelNetworks !== undefined) {
if (Object.keys(toplevelNetworks).includes(serviceNetworks[index])) {
if (toplevelNetworks[serviceNetworks[index]].external === true) {
// it is external network
networkName = toplevelNetworks[serviceNetworks[index]].name
}
}
}
let networkTemplate = {

@@ -514,3 +529,12 @@ NetworkingConfig: {

let network = serviceNetworks[networkNames[index]] || {};
let networkName = projectName + '_' + networkNames[index];
let networkName = projectName + '_' + serviceNetworks[index];
// check if network is external
if (toplevelNetworks !== undefined) {
if (Object.keys(toplevelNetworks).includes(networkNames[index])) {
if (toplevelNetworks[networkNames[index]].external === true) {
// it is external network
networkName = toplevelNetworks[networkNames[index]].name
}
}
}
let networkTemplate = {

@@ -517,0 +541,0 @@ NetworkingConfig: {

{
"name": "dockerode-compose",
"version": "1.3.3",
"version": "1.4.0",
"description": "docker-compose in nodejs using dockerode",
"main": "./compose.js",
"scripts": {
"test": "./node_modules/mocha/bin/mocha -R spec --exit"
"test": "./node_modules/mocha/bin/mocha.js -R spec --exit"
},

@@ -24,3 +24,3 @@ "repository": {

"dependencies": {
"dockerode": "^3.3.0",
"dockerode": "^4.0.0",
"js-yaml": "^4.0.0",

@@ -32,4 +32,4 @@ "tar-fs": "^2.1.1"

"memorystream": "~0.3.0",
"mocha": "^7.1.0"
"mocha": "^10.2.0"
}
}

Sorry, the diff of this file is not supported yet

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