{"id":16959848,"url":"https://github.com/jondotsoy/docker_child_process","last_synced_at":"2026-04-27T16:32:04.108Z","repository":{"id":65407197,"uuid":"583513815","full_name":"JonDotsoy/docker_child_process","owner":"JonDotsoy","description":"Simple docker agent to NodeJS to run scripts in a container.","archived":false,"fork":false,"pushed_at":"2023-01-21T23:03:12.000Z","size":234,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"develop","last_synced_at":"2025-09-30T03:28:19.951Z","etag":null,"topics":["child-process","docker"],"latest_commit_sha":null,"homepage":"http://npmjs.com/docker_child_process","language":"TypeScript","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/JonDotsoy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-12-30T02:13:15.000Z","updated_at":"2023-01-31T22:51:29.000Z","dependencies_parsed_at":"2023-02-12T13:17:01.134Z","dependency_job_id":null,"html_url":"https://github.com/JonDotsoy/docker_child_process","commit_stats":null,"previous_names":["jondotsoy/docker-instance"],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/JonDotsoy/docker_child_process","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonDotsoy%2Fdocker_child_process","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonDotsoy%2Fdocker_child_process/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonDotsoy%2Fdocker_child_process/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonDotsoy%2Fdocker_child_process/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JonDotsoy","download_url":"https://codeload.github.com/JonDotsoy/docker_child_process/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonDotsoy%2Fdocker_child_process/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278399691,"owners_count":25980334,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["child-process","docker"],"created_at":"2024-10-13T22:46:22.508Z","updated_at":"2025-10-05T02:22:58.474Z","avatar_url":"https://github.com/JonDotsoy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker_child_process\n\nA simple docker agent at NodeJS to run scripts in a container.\n\n## Installation\n\nUsing [npm](https://npmjs.com):\n\n```sh\n$ npm install docker_child_process\n```\n\nIn NodeJS:\n\n```ts\nimport { createInterface } from \"docker_child_process\";\n\nconst dockerInstance = createInterface();\n\nawait dockerInstance.init();\n\nawait dockerInstance.exec(`echo ok`);\n// # Docker: ok\n\nconst { outputs } = await dockerInstance.exec(`echo \"###=\u003e FOO=VAZ\"`);\n\noutputs; // =\u003e { FOO: \"VAZ\" }\n\nconst { outputs } = await dockerInstance.exec(\n    `echo '###=\u003e FOO={ \"VAZ\": \"BIZ\" }'`\n);\n\noutputs; // =\u003e { FOO: { VAZ: \"BIZ\" } }\n\nconst { outputs } = await dockerInstance.exec(\n    `echo \"### =\u003e lodash=$(npm search lodash --json -p | jq '.[0]' -r --indent 0)\"`\n);\n\noutputs; // =\u003e { lodash:{\"name\":\"lodash\",\"scope\":\"unscoped\",\"version\":\"4.17.21\",\"description\":\"Lodash modular utilities.\",\"keywords\":[\"modules\",\"stdlib\",\"util\"],\"date\":\"2021-02-20T15:42:16.891Z\",\"links\":{\"npm\":\"https://www.npmjs.com/package/lodash\",\"homepage\":\"https://lodash.com/\",\"repository\":\"https://github.com/lodash/lodash\",\"bugs\":\"https://github.com/lodash/lodash/issues\"},\"author\":{\"name\":\"John-David Dalton\",\"email\":\"john.david.dalton@gmail.com\",\"username\":\"jdalton\"},\"publisher\":{\"username\":\"bnjmnt4n\",\"email\":\"benjamin@dev.ofcr.se\"},\"maintainers\":[{\"username\":\"mathias\",\"email\":\"mathias@qiwi.be\"},{\"username\":\"jdalton\",\"email\":\"john.david.dalton@gmail.com\"},{\"username\":\"bnjmnt4n\",\"email\":\"benjamin@dev.ofcr.se\"}]} }\n```\n\n## Copy files\n\nTo copy a file into the container, it's posible to call the `Instance.prototype.cp()` function.\n\n```ts\nconst localFile = new URL(\"file\", import.meta.url);\nawait dockerInstance.cp(localFile, \"file\");\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjondotsoy%2Fdocker_child_process","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjondotsoy%2Fdocker_child_process","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjondotsoy%2Fdocker_child_process/lists"}