{"id":30092752,"url":"https://github.com/hwisnu222/docainer","last_synced_at":"2026-04-29T21:01:58.034Z","repository":{"id":307479147,"uuid":"1029646601","full_name":"hwisnu222/docainer","owner":"hwisnu222","description":"A CLI tool to generate Dockerfile and docker-compose templates","archived":false,"fork":false,"pushed_at":"2025-07-31T14:24:35.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-31T15:02:43.564Z","etag":null,"topics":["cli","docker","docker-compose","docker-compose-template","yaml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hwisnu222.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-07-31T11:02:25.000Z","updated_at":"2025-07-31T14:28:50.000Z","dependencies_parsed_at":"2025-07-31T15:02:54.284Z","dependency_job_id":"fe4c4961-1255-4b39-8460-a643f5063741","html_url":"https://github.com/hwisnu222/docainer","commit_stats":null,"previous_names":["hwisnu222/docainer"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hwisnu222/docainer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwisnu222%2Fdocainer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwisnu222%2Fdocainer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwisnu222%2Fdocainer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwisnu222%2Fdocainer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hwisnu222","download_url":"https://codeload.github.com/hwisnu222/docainer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwisnu222%2Fdocainer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278350987,"owners_count":25972676,"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-04T02:00:05.491Z","response_time":63,"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":["cli","docker","docker-compose","docker-compose-template","yaml"],"created_at":"2025-08-09T08:04:09.221Z","updated_at":"2025-10-04T17:56:47.618Z","avatar_url":"https://github.com/hwisnu222.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docainer\n\nDocainer is a command-line tool that generates production-ready `Dockerfile` and `docker-compose.yml` files from predefined templates using a simple configuration file.\n\nCurrently supported on Linux only.\n\n## Table of Contents\n\n- [Introduction](#introduction)\n- [Features](#features)\n- [Installation](#installation)\n- [Usage](#usage)\n- [Configuration](#configuration)\n- [Supported Stacks](#supported-stacks)\n- [Generated Dockerfile Template](#generated-dockerfile-template)\n- [Generated Docker Compose Template](#generated-docker-compose-template)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Introduction\n\nDocainer helps developers quickly scaffold Docker configurations for web projects (e.g., Django, React, Next.js) using minimal YAML configuration. It is optimized for production environments.\n\n## Features\n\n- Auto-generates Dockerfile and docker-compose.yml\n- Based on customizable Jinja2 templates\n- Stack-aware (supports Django, React, Next.js, and more)\n- Production-ready structure\n- CLI-based interactive selection\n\n## Installation\n\nEnsure Python 3.10+ and a Linux OS.\n\n### Option 1: Clone and Build Manually\n\n```\ngit clone https://github.com/hwisnu222/docainer.git\ncd docainer\nmake build\ncd dist/\nchmod +x docainer\nsudo mv docainer /usr/local/bin/\n```\n\nThis will produce a binary file named `docainer`.\n\n### Option 2: Download Prebuilt Binary from Release\n\nDownload the latest release and install it globally:\n\n```\ncurl -fsSL https://raw.githubusercontent.com/hwisnu222/docainer/main/install.sh | sh\n```\n\n#### wget:\n\n```\nwget -qO - https://raw.githubusercontent.com/hwisnu222/docainer/main/install.sh | sh\n```\n\nNow you can run it from anywhere:\n\n```\ndocainer\n```\n\n## Usage\n\nTo run the generator:\n\n```\ndocainer\n```\n\nYou will be prompted to choose a stack. The tool will then generate the corresponding Dockerfile and docker-compose.yml files in your current directory.\n\n## Configuration\n\nStacks are defined in `config.yaml`. Example configuration:\n\n```\nreactjs:\n  dockerfile:\n    base_image: node:20-alpine\n    nginx_image: nginx:stable-alpine\n  compose:\n    service_name: \"react-app\"\n    port: 3000\n    container_port: 80\n```\n\nYou can add more stacks using the same structure.\n\n## Supported Stacks\n\n- Django\n- ReactJS\n- NextJS\n\nYou may add more by creating new folders inside the `templates/` directory.\n\n## Generated Dockerfile Template\n\n```\nFROM {{ base_image }}\n\nWORKDIR /app\n\nCOPY . .\n\nRUN {{ install_command }}\n\nCMD [ \"{{ run_command }}\" ]\n```\n\n## Generated Docker Compose Template\n\n```\nversion: \"3\"\n\nservices:\n  {{ service_name }}:\n    build:\n      context: .\n      dockerfile: Dockerfile\n    ports:\n      - \"{{ port }}:{{ container_port }}\"\n```\n\n## Contributing\n\nYou are welcome to contribute by opening issues or pull requests.\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhwisnu222%2Fdocainer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhwisnu222%2Fdocainer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhwisnu222%2Fdocainer/lists"}