{"id":19775355,"url":"https://github.com/composerize/decomposerize","last_synced_at":"2025-04-06T21:14:51.134Z","repository":{"id":197878709,"uuid":"696635685","full_name":"composerize/decomposerize","owner":"composerize","description":"Turn your Docker compose file to Docker run commands","archived":false,"fork":false,"pushed_at":"2025-03-28T13:46:54.000Z","size":3564,"stargazers_count":107,"open_issues_count":9,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-30T20:11:11.972Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/composerize.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-09-26T06:30:42.000Z","updated_at":"2025-03-30T15:05:25.000Z","dependencies_parsed_at":"2024-03-08T08:54:25.489Z","dependency_job_id":"77a38083-f856-44f6-ae90-bdc29177c5ad","html_url":"https://github.com/composerize/decomposerize","commit_stats":null,"previous_names":["outilslibre/decomposerize","composerize/decomposerize"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/composerize%2Fdecomposerize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/composerize%2Fdecomposerize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/composerize%2Fdecomposerize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/composerize%2Fdecomposerize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/composerize","download_url":"https://codeload.github.com/composerize/decomposerize/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247550690,"owners_count":20956987,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T05:15:46.168Z","updated_at":"2025-04-06T21:14:51.108Z","avatar_url":"https://github.com/composerize.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# decomposerize\n\n[![Netlify Status](https://api.netlify.com/api/v1/badges/bebf915c-cdd7-4800-9179-d1f4031b0848/deploy-status)](https://app.netlify.com/sites/decomposerize/deploys)\n[![npm](https://img.shields.io/npm/v/decomposerize.svg)](https://www.npmjs.com/package/decomposerize)\n[![ShareVB on GitHub](https://img.shields.io/badge/ShareVB-100000?logo=github\u0026logoColor=white)](https://github.com/sharevb)\n            \nhttp://decomposerize.com - Turns docker-compose file into `docker run` commands!\n\nLooking for the reverse : http://composerize.com / [Composerize](https://github.com/magicmark/composerize)\n\nWant to convert from Docker compose file formats : http://composeverter.com / [Composeverter](https://github.com/outilslibre/composeverter)\n\n## CLI\n\ndecomposerize can be run in the cli.\n\n`npm install decomposerize -g` to install, and run as such:\n\n```bash\n$ decomposerize \u003c\u003c docker-compose.yml\n```\n\n## Docker image\n\nA dockker image of composerize, decomposerize and composeverter websites is available here: https://github.com/Oaklight/composerize-minimal/blob/master/README_en.md (thanks to @Oaklight)\n\n## API\n\n**convertToDockerRunCommands(dockerComposeContent, configuration={})**\n\n   - `dockerComposeContent`: A string representing the Docker Compose file input.\n   - `configuration`: optional configuration options in form of an object\n\t   - `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'.\n\t   - `rm`: A boolean that, when true, adds the '--rm' option to the command line arguments. The default value is `false`.\n\t   - `detach`: A boolean that, when true, adds the '-d' option to the command line arguments. The default value is `false`.\n\t   - `multiline`: A boolean that, when true, emits the command in multiline shell command format. The default value is `false`.\n\t   - `'long-args'`: A boolean that, when true, emits long command line arguments (e.g., '--tty' instead of '-t'). The default value is `false`.\n\t   - `'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).\n\n**returns**\n\nIt returns the Docker run command(s) generated based on the input Docker Compose file and the provided configuration\n\n### How to use with node.js\n\nMake sure to install the `composerize` package in your project by running:\n\n```bash\nnpm install decomposerize\n```\n\nWith the following code, you can easily integrate **Decomposerize** into your Node.js project and generate Docker run command(s) from Docker Compose configurations.\n\n\n```javascript\nconst convertToDockerRunCommands = require('decomposerize');\n\nconst dockerComposeInput = `\nversion: '3'\nservices:\n  myapp:\n    image: myapp-image\n`;\n\nconst configuration = {\n  command: 'docker run',\n  rm: true,\n  detach: false,\n  multiline: true,\n  'long-args': false,\n  'arg-value-separator': ' ',\n};\n\nconst dockerRunCommands = convertToDockerRunCommands(dockerComposeInput, configuration);\n\nconsole.log('Generated Docker Run Commands:');\nconsole.log(dockerRunCommands);\n```\n\n## Contributing\n\n- [Clone a fork of the repo](https://guides.github.com/activities/forking/) and install the project dependencies by running `yarn`\n- Make your changes, and build the project by running `make build`\n- Test your changes with `make test`\n\n## Maintainers\n\n- ShareVB [GitHub](https://github.com/sharevb)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomposerize%2Fdecomposerize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcomposerize%2Fdecomposerize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcomposerize%2Fdecomposerize/lists"}