{"id":18600152,"url":"https://github.com/lenra-io/dofigen","last_synced_at":"2026-02-25T18:15:47.965Z","repository":{"id":57750234,"uuid":"517677183","full_name":"lenra-io/dofigen","owner":"lenra-io","description":"Dofigen is a Dockerfile generator using a simplified description in YAML or JSON format","archived":false,"fork":false,"pushed_at":"2026-02-23T10:52:43.000Z","size":746,"stargazers_count":60,"open_issues_count":25,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-02-23T19:22:17.106Z","etag":null,"topics":["cli","docker","docker-image","dockerfile","hacktoberfest","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/lenra-io.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["lenra-io"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2022-07-25T13:29:50.000Z","updated_at":"2026-02-23T10:52:45.000Z","dependencies_parsed_at":"2023-11-29T17:47:09.821Z","dependency_job_id":"64f95044-096e-475c-b0a5-7b62713b8a71","html_url":"https://github.com/lenra-io/dofigen","commit_stats":{"total_commits":146,"total_committers":6,"mean_commits":"24.333333333333332","dds":"0.32191780821917804","last_synced_commit":"9d9a1a621ecf8b2bc67ebd8852b9bd65d8b12f65"},"previous_names":[],"tags_count":60,"template":false,"template_full_name":null,"purl":"pkg:github/lenra-io/dofigen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fdofigen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fdofigen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fdofigen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fdofigen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lenra-io","download_url":"https://codeload.github.com/lenra-io/dofigen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lenra-io%2Fdofigen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29834069,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T17:57:15.019Z","status":"ssl_error","status_checked_at":"2026-02-25T17:56:11.472Z","response_time":61,"last_error":"SSL_read: 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":["cli","docker","docker-image","dockerfile","hacktoberfest","rust"],"created_at":"2024-11-07T02:03:12.545Z","updated_at":"2026-02-25T18:15:47.960Z","avatar_url":"https://github.com/lenra-io.png","language":"Rust","funding_links":["https://github.com/sponsors/lenra-io"],"categories":[],"sub_categories":[],"readme":"\u003cdiv id=\"top\"\u003e\u003c/div\u003e\n\u003c!--\n*** Thanks for checking out the Best-README-Template. If you have a suggestion\n*** that would make this better, please fork the repo and create a pull request\n*** or simply open an issue with the tag \"enhancement\".\n*** Don't forget to give the project a star!\n*** Thanks again! Now go create something AMAZING! :D\n--\u003e\n\n\n\n\u003c!-- PROJECT SHIELDS --\u003e\n\u003c!--\n*** I'm using markdown \"reference style\" links for readability.\n*** Reference links are enclosed in brackets [ ] instead of parentheses ( ).\n*** See the bottom of this document for the declaration of the reference variables\n*** for contributors-url, forks-url, etc. This is an optional, concise syntax you may use.\n*** https://www.markdownguide.org/basic-syntax/#reference-style-links\n--\u003e\n\n\n\u003cdiv align=\"center\"\u003e\n\n[![Contributors][contributors-shield]][contributors-url]\n[![Forks][forks-shield]][forks-url]\n[![Stargazers][stars-shield]][stars-url]\n[![Issues][issues-shield]][issues-url]\n[![MIT License][license-shield]][license-url]\n[![Crates.io][crate-shield]][crate-url]\n[![Twitch][twitch-shield]][twitch-url]\n\n\u003cimg alt=\"Dofigen logo\" src=\"./logo.svg\" width=\"256\" style=\"margin: 20px 0\" /\u003e \n\n# Dofigen\n\n\u003c/div\u003e\n\nDofigen is a Dockerfile generator using a simplified description in YAML or JSON format.\nIt defines default values and behaviors that simplify the creation of Dockerfiles.\n\nDofigen is also made to use the Buildkit, which is now the default Docker build engine, optimizations that speed-up the Docker image build by parallelizing the layer builds.\n\nA french DevOps said about it:\n\u003e C'est une bouffée, Dofigen, dans ce monde de con...teneurs.\n\n[Report Bug](https://github.com/lenra-io/dofigen/issues)\n·\n[Request Feature](https://github.com/lenra-io/dofigen/issues)\n\n\u003c!-- GETTING STARTED --\u003e\n## Getting Started\n\n### Prerequisites\n\nInstall Dofigen using one of the following options.\n\n#### Use it with Docker\n\nYou can run Dofigen directly from its Docker image with the following command:\n\n```bash\ndocker run --rm -it -v $(pwd):/app -u $UID lenra/dofigen --help\n```\n\n#### Arch Linux\n\n[dofigen](https://aur.archlinux.org/packages/dofigen) is available as an AUR package.\n\nYou can install it using an AUR helper (e.g. `paru`):\n\n```bash\nparu -S dofigen\n```\n\n#### Cargo\n\nFirst install Cargo, the Rust package manager: https://doc.rust-lang.org/cargo/getting-started/installation.html\n\nThen use the following command to install dofigen:\n\n```bash\ncargo install dofigen\n```\n\n#### Homebrew\n\nYou can install Dofigen using Homebrew:\n\n```bash\nbrew tap lenra-io/tools\nbrew install dofigen\n```\n\nOr:\n\n```bash\nbrew install lenra-io/tools/dofigen\n```\n\n#### Download the binary\n\nYou can download the Dofigen binary from [the release page](https://github.com/lenra-io/dofigen/releases) and add it to your path environment variable.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### Migrate from an existing Dockerfile\n\nYou can generate a Dofigen file from an existing Dockerfile using the `dofigen parse` command:\n\n```bash\ndofigen parse\n```\n\nThis command will read the Dockerfile from the current directory and generate a `dofigen.yml` file.\n\nSee the `dofigen parse --help` command for more options.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n### How to use it\n\nTo generate a Dockerfile, you need to create a Dofigen file `dofigen.yml` and run the next command:\n\n```bash\ndofigen gen\n```\n\nUse the help options to understand how to override default behaviors:\n\n```bash\n$ dofigen gen --help\nGenerate the Dockerfile and .dockerignore files\n\nUsage: dofigen generate [OPTIONS]\n\nOptions:\n  -f, --file \u003cFILE\u003e      The input Dofigen file. Default search for the next files: dofigen.yml, dofigen.yaml, dofigen.json Use \"-\" to read from stdin\n      --offline          The command won't load data from any URL. This disables extending file from URL and loading image tag\n  -o, --output \u003cOUTPUT\u003e  The output Dockerfile file Define to - to write to stdout [default: Dockerfile]\n  -l, --locked           Locked version of the dofigen definition\n  -n, --no-labels        Do not define the default labels\n  -h, --help             Print help\n```\n\nTo look further use the help command:\n\n```bash\ndofigen --help\n```\n\n\n### Dofigen descriptor\n\nThe structure of the Dofigen descriptor was created to be simpler than the Dockerfile.\n\nThe structure description is detailed [here](./docs/struct.md).\n\nHere is an example to generate the Dofigen Dockerfile:\n\n```yaml\nbuilders:\n  muslrust:\n    fromImage: clux/muslrust:stable\n    workdir: /app\n    bind:\n      - Cargo.toml\n      - Cargo.lock\n      - src/\n    run:\n      # Build with musl to work with scratch\n      - cargo build --release\n      # copy the generated binary outside of the target directory. If not the other stages won't be able to find it since it's in a cache volume\n      - mv target/x86_64-unknown-linux-musl/release/dofigen /tmp/\n    cache:\n      # Cargo cache\n      - /home/rust/.cargo\n      # build cache\n      - /app/target\n\n# Runtime\nworkdir: /app\ncopy:\n  - fromBuilder: muslrust\n    paths: \"/tmp/dofigen\"\n    target: \"/bin/\"\nentrypoint: dofigen\ncmd: --help\ncontext:\n  - \"/src\"\n  - \"/Cargo.*\"\n```\n\n### Extending external files\n\nYou can extend the Dofigen file with external files using the `extend` attribute.\nYou can find some Dofigen templates on the [Dofigen Hub repository](https://github.com/lenra-io/dofigen-hub).\nHere is an example of extending a Dofigen file:\n\n```yaml\nextend:\n  - https://raw.githubusercontent.com/lenra-io/dofigen/main/dofigen.yml\n```\n\nYou can also override or merge the structure of the extended files:\n\n```yaml\nextend:\n  - https://raw.githubusercontent.com/lenra-io/dofigen/main/dofigen.yml\nuser: 1001\n```\n\n### The lock file\n\nDofigen generates a lock file to keep the version of the Dofigen descriptor used to generate the Dockerfile.\nThe lock file also keep the loaded resources and images tags to rebuild the Dockerfile with the same versions.\nTo update the images and resources, you can use the `dofigen update` command.\nTo regenerate the Dockerfile with the same versions, you can use the `dofigen gen --locked` command.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\u003c!-- CONTRIBUTING --\u003e\n## Contributing\n\nContributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.\n\nIf you have a suggestion that would make this better, please open an issue with the tag \"enhancement\" or \"bug\".\nDon't forget to give the project a star! Thanks again!\n\n### Tests\n\nTo run the tests, use the following command:\n\n```bash\ncargo test\n```\n\n#### Test coverage\n\nTo generate the test coverage, use the following commands:\n\n```bash\n# Generate the coverage report\nRUSTFLAGS=\"-C instrument-coverage\" \\\n  RUSTDOCFLAGS=\"-C instrument-coverage\" \\\n  LLVM_PROFILE_FILE=\"target/coverage/profiles/cargo-test-%p-%m.profraw\" \\\n  cargo test\n# Convert to lcov format\ngrcov target/coverage/profiles/ --binary-path ./target/debug/deps/ -s . -t lcov --branch --ignore-not-existing -o target/coverage/lcov.info\n# Generate the HTML report\ngrcov target/coverage/profiles/ --binary-path ./target/debug/deps/ -s . -t html --branch --ignore-not-existing -o target/coverage/html\n```\n\n### Generate the JSON Schema\n\nTo generate the JSON schema of the Dofigen file structure, use the following command:\n\n```bash\n# Generate the JSON Schema\ncargo run -F json_schema -- schema \u003e docs/dofigen.schema.json\n# Download the SchemaStore's Prettier configuration\ncurl -O -L -f -s -H 'Accept: application/vnd.github.v3.raw' https://github.com/SchemaStore/schemastore/raw/refs/heads/master/.prettierrc.cjs\n# Install Prettier if you don't have it\nnpm i -g prettier prettier-plugin-sort-json prettier-plugin-toml\n# Format the JSON Schema\nnpx prettier --config .prettierrc.cjs --write docs/dofigen.schema.json\n```\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- LICENSE --\u003e\n## License\n\nDistributed under the **MIT** License. See [LICENSE](./LICENSE) for more information.\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\n\u003c!-- CONTACT --\u003e\n## Contact\n\nLenra - [@lenra_dev](https://twitter.com/lenra_dev) - contact@lenra.io\n\nProject Link: [https://github.com/lenra-io/dofigen](https://github.com/lenra-io/dofigen)\n\n\u003cp align=\"right\"\u003e(\u003ca href=\"#top\"\u003eback to top\u003c/a\u003e)\u003c/p\u003e\n\n\n\u003c!-- MARKDOWN LINKS \u0026 IMAGES --\u003e\n\u003c!-- https://www.markdownguide.org/basic-syntax/#reference-style-links --\u003e\n[contributors-shield]: https://img.shields.io/github/contributors/lenra-io/dofigen.svg?style=for-the-badge\n[contributors-url]: https://github.com/lenra-io/dofigen/graphs/contributors\n[forks-shield]: https://img.shields.io/github/forks/lenra-io/dofigen.svg?style=for-the-badge\n[forks-url]: https://github.com/lenra-io/dofigen/network/members\n[stars-shield]: https://img.shields.io/github/stars/lenra-io/dofigen.svg?style=for-the-badge\n[stars-url]: https://github.com/lenra-io/dofigen/stargazers\n[issues-shield]: https://img.shields.io/github/issues/lenra-io/dofigen.svg?style=for-the-badge\n[issues-url]: https://github.com/lenra-io/dofigen/issues\n[license-shield]: https://img.shields.io/github/license/lenra-io/dofigen.svg?style=for-the-badge\n[license-url]: https://github.com/lenra-io/dofigen/blob/master/LICENSE.txt\n[crate-shield]: https://img.shields.io/crates/v/dofigen.svg?style=for-the-badge\n[crate-url]: https://crates.io/crates/dofigen\n[twitch-shield]: https://img.shields.io/twitch/status/lenra4devs?logo=twitch\u0026logoColor=white\u0026style=for-the-badge\n[twitch-url]: https://twitch.tv/lenra4devs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flenra-io%2Fdofigen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flenra-io%2Fdofigen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flenra-io%2Fdofigen/lists"}