
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
decomposerize
Advanced tools
[](https://www.npmjs.com/package/decomposerize) [](https://github.com/sharevb)
http://decomposerize.com - Turns docker-compose file into docker run
commands!
Looking for the reverse : http://composerize.com / Composerize
Want to convert from Docker compose file formats : http://composeverter.com / Composeverter
decomposerize can be run in the cli.
npm install decomposerize -g
to install, and run as such:
$ decomposerize << docker-compose.yml
convertToDockerRunCommands(dockerComposeContent, configuration={})
dockerComposeContent
: A string representing the Docker Compose file input.configuration
: optional configuration options in form of an object
command
: A string that defines the Docker command to generate (e.g., 'docker run', 'docker create', 'docker container run'). It has a default value of 'docker run'.rm
: A boolean that, when true, adds the '--rm' option to the command line arguments. The default value is false
.detach
: A boolean that, when true, adds the '-d' option to the command line arguments. The default value is false
.multiline
: A boolean that, when true, emits the command in multiline shell command format. The default value is false
.'long-args'
: A boolean that, when true, emits long command line arguments (e.g., '--tty' instead of '-t'). The default value is false
.'arg-value-separator'
: A string representing the separator used between command arguments and their values. It can be either ' ' (space) or '='. The default value is ' ' (space).returns
It returns the Docker run command(s) generated based on the input Docker Compose file and the provided configuration
Make sure to install the composerize
package in your project by running:
npm install decomposerize
With the following code, you can easily integrate Decomposerize into your Node.js project and generate Docker run command(s) from Docker Compose configurations.
const convertToDockerRunCommands = require('decomposerize');
const dockerComposeInput = `
version: '3'
services:
myapp:
image: myapp-image
`;
const configuration = {
command: 'docker run',
rm: true,
detach: false,
multiline: true,
'long-args': false,
'arg-value-separator': ' ',
};
const dockerRunCommands = convertToDockerRunCommands(dockerComposeInput, configuration);
console.log('Generated Docker Run Commands:');
console.log(dockerRunCommands);
yarn
make build
make test
Needs yarn@1.19.1. See https://github.com/yarnpkg/yarn/issues/7734.
FAQs
[](https://www.npmjs.com/package/decomposerize) [](https://github.com/sharevb)
The npm package decomposerize receives a total of 121 weekly downloads. As such, decomposerize popularity was classified as not popular.
We found that decomposerize demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.