{"id":27535664,"url":"https://github.com/tudvari/dockerfile-generator","last_synced_at":"2026-03-15T01:32:39.105Z","repository":{"id":2645869,"uuid":"47062052","full_name":"tudvari/dockerfile-generator","owner":"tudvari","description":"Dockerfile Generator for Node.js","archived":false,"fork":false,"pushed_at":"2026-02-26T08:27:35.000Z","size":1328,"stargazers_count":21,"open_issues_count":0,"forks_count":9,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-02-26T13:41:37.818Z","etag":null,"topics":["docker","dockerfile-generator","javascript","json"],"latest_commit_sha":null,"homepage":"","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/tudvari.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2015-11-29T12:07:12.000Z","updated_at":"2026-02-26T08:27:32.000Z","dependencies_parsed_at":"2023-07-05T18:17:53.540Z","dependency_job_id":"d7cf285b-b164-452d-847d-d2f86216e07a","html_url":"https://github.com/tudvari/dockerfile-generator","commit_stats":{"total_commits":339,"total_committers":6,"mean_commits":56.5,"dds":"0.29793510324483774","last_synced_commit":"6dfe4117f249e940744ca08142346a89f48be9fd"},"previous_names":[],"tags_count":29,"template":false,"template_full_name":null,"purl":"pkg:github/tudvari/dockerfile-generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tudvari%2Fdockerfile-generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tudvari%2Fdockerfile-generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tudvari%2Fdockerfile-generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tudvari%2Fdockerfile-generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tudvari","download_url":"https://codeload.github.com/tudvari/dockerfile-generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tudvari%2Fdockerfile-generator/sbom","scorecard":{"id":901898,"data":{"date":"2025-08-11","repo":{"name":"github.com/tudvari/dockerfile-generator","commit":"51132a18a3ccee46fec7fbe117a90ecc498e4f0f"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.3,"checks":[{"name":"Code-Review","score":-1,"reason":"Found no human activity in the last 15 changesets","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/nodejs.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/tudvari/dockerfile-generator/nodejs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nodejs.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/tudvari/dockerfile-generator/nodejs.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/nodejs.yml:21","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":10,"reason":"24 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-24T15:53:09.206Z","repository_id":2645869,"created_at":"2025-08-24T15:53:09.206Z","updated_at":"2025-08-24T15:53:09.206Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30054004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T17:46:22.538Z","status":"ssl_error","status_checked_at":"2026-03-03T17:46:22.036Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["docker","dockerfile-generator","javascript","json"],"created_at":"2025-04-18T19:09:51.064Z","updated_at":"2026-03-15T01:32:39.072Z","avatar_url":"https://github.com/tudvari.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dockerfile-generator\n\nGenerating Dockerfile from JSON and generate JSON document from a Dockerfile.  \n  \n![Node.js CI](https://github.com/tudvari/dockerfile-generator/workflows/Node.js%20CI/badge.svg)\n[![npm version](https://badge.fury.io/js/dockerfile-generator.svg)](https://badge.fury.io/js/dockerfile-generator)\n\n##  Latest release note\n\n## Version 5.0.5 (14.03.2026)\n- Update dependencies\n- Migrate tests from mocha to jest\n\n## Version 5.0.4 (21.12.2025)\n- Update dependencies\n\n## Version 5.0.3 (28.10.2024)\n- Update dependencies\n\nRelease notes of previous versions: [Release notes](ReleaseNotes.md).\n\n## Installation\n\n```shell\nnpm install dockerfile-generator\n```\n## How to use the library\n\nYou can find here the reference doc: [References](References.md).\n\n```Javascript\nconst generator = require('dockerfile-generator')\n\nconst result = await generator.generateDockerFile(inputJson)\n// Result is a generated Dockerfile.\n\nconst generateResult = generator.generateDockerFileFromArray(inputArray)\n// Result is a generated Dockerfile.\n\nconst convertedJSON = generator.convertToJSON(inputDockerFile)\n// Result is a generated JSON from Dockerfile.\n\nconst genereratedIgnore = await generator.generateIgnoreFile(ignoredElementsArray)\n// generatedIgnore is a generated dockerignore file\n```\n\n## Examples\n\n##### Example for Dockerfile Generation JSON Input ( generateDockerFile function )\n\n###### Input\n\n```json\n    {\n      \"from\": \"nginx:latest\",\n      \"run\": [ \"adduser\", \"--disabled-password\", \"-gecos\", \"\", \"testuser\" ],\n      \"volumes\": [ \"/home/testuser/app\" ],\n      \"user\": \"testuser\",\n      \"working_dir\": \"/home/testuser/app\",\n      \"labels\": {\n        \"name\": \"value\"\n      },\n      \"env\": {\n        \"env1\": \"value1\",\n        \"env2\": \"value2\"\n      },\n      \"add\": {\n        \"test.run\" : \"/home/testuser/app/test.run\"\n      },\n      \"copy\":  {\n        \"test.cmd\" : \"/home/testuser/app/test.cmd\"\n      },\n      \"entrypoint\": \"tail\",\n      \"cmd\": [\"-f\", \"/dev/null\"],\n      \"expose\": [\"80/tcp\"],\n      \"args\": [ \"value1\", \"value2\"],\n      \"stopsignal\": \"stop\",\n      \"shell\": [ \"/bin/bash\", \"-c\", \"echo\", \"hello\" ],\n      \"comment\": \"This is a comment\"\n    }\n```\n###### Output\n\n```javascript\nFROM nginx:latest\nRUN [ \"adduser\", \"--disabled-password\", \"-gecos\", \"\", \"testuser\" ]\nVOLUME /home/testuser/app\nUSER testuser\nWORKDIR /home/testuser/app\nLABEL name=value\nENV env1=value1\nENV env2=value2\nADD test.run /home/testuser/app/test.run\nCOPY test.cmd /home/testuser/app/test.cmd\nENTRYPOINT [ \"tail\" ]\nCMD [ \"-f\", \"/dev/null\" ]\nEXPOSE 80/tcp\nARG value1\nARG value2\nSTOPSIGNAL stop\nSHELL [ \"/bin/bash\", \"-c\", \"echo\", \"hello\"]\n# This is a comment\n```\n\n##### Example for Dockerfile Generation Array Input ( generateDockerFileFromArray function )\n\n###### Input\n\n```json\n  [\n    {\n      \"from\": \"nginx:latest\"\n    },\n     {\n      \"run\": [ \"adduser\", \"--disabled-password\", \"-gecos\", \"\", \"testuser\" ]\n    },\n     {\n      \"volumes\": [ \"/home/testuser/app\" ]\n    },\n     {\n      \"user\": \"testuser\"\n    },\n     {\n      \"working_dir\": \"/home/testuser/app\"\n    },\n     {  \n      \"labels\": {\n        \"name\": \"value\"\n      }\n    },\n     {\n      \"env\": {\n        \"env1\": \"value1\",\n        \"env2\": \"value2\"\n      }\n    },\n     {\n      \"add\": {\n        \"test.run\" : \"/home/testuser/app/test.run\"\n      }\n    },\n     {\n      \"copy\":  {\n        \"test.cmd\" : \"/home/testuser/app/test.cmd\"\n      }\n    },\n    {  \n      \"entrypoint\": \"tail\"\n    },\n    {\n      \"cmd\": [\"-f\", \"/dev/null\"]\n    },\n    {\n      \"expose\": [\"80/tcp\"]\n    },\n    {\n      \"args\": [ \"value1\", \"value2\"]\n    },\n    {\n      \"stopsignal\": \"stop\"\n    },\n    {\n      \"shell\": [ \"/bin/bash\", \"-c\", \"echo\", \"hello\" ]\n    },\n  ]\n```\n###### Output\n\n```javascript\nFROM nginx:latest\nRUN [ \"adduser\", \"--disabled-password\", \"-gecos\", \"\", \"testuser\" ]\nVOLUME /home/testuser/app\nUSER testuser\nWORKDIR /home/testuser/app\nLABEL name=value\nENV env1=value1\nENV env2=value2\nADD test.run /home/testuser/app/test.run\nCOPY test.cmd /home/testuser/app/test.cmd\nENTRYPOINT [ \"tail\" ]\nCMD [ \"-f\", \"/dev/null\" ]\nEXPOSE 80/tcp\nARG value1\nARG value2\nSTOPSIGNAL stop\nSHELL [ \"/bin/bash\", \"-c\", \"echo\", \"hello\"]\n```\n#### Example for JSON Generation ( convertToJSON function )\n\n##### Example Input\n\n```javascript\nFROM nginx:latest\nRUN [ \"adduser\", \"--disabled-password\", \"-gecos\", \"\", \"testuser\" ]\nVOLUME /home/testuser/app\nUSER testuser\nWORKDIR /home/testuser/app\nLABEL name=value\nENV env1=value1\nENV env2=value2\nADD test.run /home/testuser/app/test.run\nCOPY test.cmd /home/testuser/app/test.cmd\nENTRYPOINT [ \"tail\" ]\nCMD [ \"-f\", \"/dev/null\" ]\nEXPOSE 80/tcp\nARG value1\nARG value2\nSTOPSIGNAL stop\nSHELL [ \"/bin/bash\", \"-c\", \"echo\", \"hello\"]\n# This is a comment\n```\n\n##### Example Output\n\n```json\n    {\n      \"from\": \"nginx:latest\",\n      \"run\": [ \"adduser\", \"--disabled-password\", \"-gecos\", \"\", \"testuser\" ],\n      \"volumes\": [ \"/home/testuser/app\" ],\n      \"user\": \"testuser\",\n      \"working_dir\": \"/home/testuser/app\",\n      \"labels\": {\n        \"name\": \"value\"\n      },\n      \"env\": {\n        \"env1\": \"value1\",\n        \"env2\": \"value2\"\n      },\n      \"add\": {\n        \"test.run\" : \"/home/testuser/app/test.run\"\n      },\n      \"copy\":  {\n        \"test.cmd\" : \"/home/testuser/app/test.cmd\"\n      },\n      \"entrypoint\": \"tail\",\n      \"cmd\": [\"-f\", \"/dev/null\"],\n      \"expose\": [\"80/tcp\"],\n      \"args\": [ \"value1\", \"value2\"],\n      \"stopsignal\": \"stop\",\n      \"shell\": [ \"/bin/bash\", \"-c\", \"echo\", \"hello\" ],\n      \"comment_1\": \"This is a comment\"\n    }\n```\n\n#### Example for .dockerignore Generation ( generateIgnoreFile function )\n\n##### Input\n```javascript\n['node_modules','.git']\n```\n\n##### Output\n\n```javascript\nnode_modules\n.git\n```\n\n\n\n### License\n\nCopyright (c) 2015 Tibor Udvari. Released under the MIT license. See [LICENSE](https://github.com/tudvari/docker-composer/blob/master/LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftudvari%2Fdockerfile-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftudvari%2Fdockerfile-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftudvari%2Fdockerfile-generator/lists"}