GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - coderamp-labs/gitcontainer: Replace "github" with "gitcontainer" in URLs to generate a dockerfile.

BranchesTags
Open more actions menu

Latest commit

 

History

32 Commits
32 Commits

Folders and files

NameName
Last commit message
Last commit date
docs
docs
 
 
static
static
 
 
templates
templates
 
 
tools
tools
 
 
.gitignore
.gitignore
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
app.py
app.py
 
 
colors.txt
colors.txt
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

Gitcontainer

Gitcontainer 🐳

Turn any GitHub repository into a production-ready Docker container with AI-powered Dockerfile generation.

MIT License Python 3.9+ FastAPI

Gitcontainer is an AI-powered web application that automatically generates production-ready Dockerfiles by analyzing GitHub repositories. Simply paste a GitHub URL and get a tailored Dockerfile with intelligent base image selection, dependency management, and Docker best practices.

🌟 Quick Access

Simply replace github.com with gitcontainer.com in any GitHub repository URL to instantly access the Dockerfile generation page for that repository.

For example:

https://github.com/username/repo  →  https://gitcontainer.com/username/repo

✨ Features

  • šŸ”„ Instant URL Access: Just replace 'github.com' with 'gitcontainer.com' in any GitHub URL
  • šŸ¤– AI-Powered Analysis: Uses OpenAI GPT-4 to analyze repository structure and generate intelligent Dockerfiles
  • ⚔ Real-time Streaming: Watch the AI generate your Dockerfile in real-time with WebSocket streaming
  • šŸŽÆ Smart Detection: Automatically detects technology stacks (Python, Node.js, Java, Go, etc.)
  • šŸ”§ Production-Ready: Generates Dockerfiles following best practices with proper security, multi-stage builds, and optimization
  • šŸ“‹ Additional Instructions: Add custom requirements for specialized environments
  • šŸ“„ Docker Compose: Automatically suggests docker-compose.yml for complex applications
  • šŸŽØ Modern UI: Clean, responsive interface with Monaco editor for syntax highlighting
  • šŸ“± Mobile Friendly: Works seamlessly on desktop and mobile devices

šŸš€ Quick Start

Prerequisites

  • Python 3.9 or higher
  • Git
  • OpenAI API key

Installation

  1. Clone the repository:

    git clone https://github.com/cyclotruc/gitcontainer.git
    cd gitcontainer
  2. Install dependencies:

    pip install -r requirements.txt
  3. Set up environment variables:

    # Create .env file
    echo "OPENAI_API_KEY=your_openai_api_key_here" > .env
  4. Run the application:

    python app.py
  5. Open your browser: Navigate to http://localhost:8000

šŸ› ļø How It Works

  1. URL Processing: Access any repository by replacing 'github.com' with 'gitcontainer.com' in the URL
  2. Repository Cloning: Gitcontainer clones the GitHub repository locally using Git
  3. Code Analysis: Uses gitingest to analyze the repository structure and extract relevant information
  4. AI Generation: Sends the analysis to OpenAI GPT-4 with specialized prompts for Dockerfile generation
  5. Smart Optimization: The AI considers:
    • Technology stack detection
    • Dependency management
    • Security best practices
    • Multi-stage builds when beneficial
    • Port configuration
    • Environment variables
    • Health checks

šŸ“ Project Structure

cyclotruc-gitcontainer/
ā”œā”€ā”€ app.py                 # Main FastAPI application
ā”œā”€ā”€ requirements.txt       # Python dependencies
ā”œā”€ā”€ .env                  # Environment variables (create this)
ā”œā”€ā”€ static/               # Static assets (icons, CSS)
ā”œā”€ā”€ templates/
│   └── index.jinja       # Main HTML template
└── tools/                # Core functionality modules
    ā”œā”€ā”€ __init__.py
    ā”œā”€ā”€ create_container.py  # AI Dockerfile generation
    ā”œā”€ā”€ git_operations.py    # GitHub repository cloning
    └── gitingest.py        # Repository analysis

šŸ”§ Configuration

Environment Variables

Variable Description Required
OPENAI_API_KEY Your OpenAI API key Yes
PORT Server port (default: 8000) No
HOST Server host (default: 0.0.0.0) No

Advanced Usage

You can use the tools programmatically:

from tools import clone_repo_tool, gitingest_tool, create_container_tool
import asyncio

async def generate_dockerfile(github_url):
    # Clone repository
    clone_result = await clone_repo_tool(github_url)
    
    # Analyze with gitingest
    analysis = await gitingest_tool(clone_result['local_path'])
    
    # Generate Dockerfile
    dockerfile = await create_container_tool(
        gitingest_summary=analysis['summary'],
        gitingest_tree=analysis['tree'],
        gitingest_content=analysis['content']
    )
    
    return dockerfile

# Usage
result = asyncio.run(generate_dockerfile("https://github.com/user/repo"))
print(result['dockerfile'])

šŸŽØ Customization

Adding Custom Instructions

Use the "Additional instructions" feature to customize generation:

  • "Use Alpine Linux for smaller image size"
  • "Include Redis and PostgreSQL"
  • "Optimize for production deployment"
  • "Add development tools for debugging"

šŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.

šŸ™ Acknowledgments

  • OpenAI for providing the GPT-4 API
  • gitingest for repository analysis capabilities
  • FastAPI for the excellent web framework
  • Monaco Editor for code syntax highlighting

šŸ”— Links

  • GitHub Repository: https://github.com/cyclotruc/gitcontainer
  • Demo: Try it live with example repositories
  • Issues: Report bugs or request features

Made with ā¤ļø by Romain Courtois

Turn any repository into a container in seconds!

About

Replace "github" with "gitcontainer" in URLs to generate a dockerfile.

gitcontainer.com

Topics

containerdocker

Resources

Readme
MIT license
Activity
Custom properties

Stars

133 stars

Watchers

3 watching

Forks

13 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800Ɨ600. No cookies required.