Skip to content

shafnir/dockerfile-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dockerfile Generator

A web-based tool that automatically generates production-ready Dockerfiles for different programming languages using AI. Built with Flask and Ollama AI.

Features

  • Web interface for easy Dockerfile generation
  • AI-powered Dockerfile creation using Ollama
  • Produces production-ready Dockerfiles with best practices
  • Input validation and error handling
  • Supports multiple programming languages

Prerequisites

  • Python 3.x
  • Docker (optional, for testing generated Dockerfiles)
  • Ollama installed and running locally (In this script, Ollama 3.2:1b model is being used. Change accordingly).

Installation

  1. Clone the repository:

    git clone https://github.com/shafnir/dockerfile-generator.git
    cd Dockerfile_Generator
  2. Install dependencies:

    pip install -r requirements.txt

Usage

  1. Start the web application:

    python main.py
  2. Open your browser and navigate to http://localhost:5000

  3. Enter your programming language in the web interface

  4. Click generate to receive a customized, production-ready Dockerfile

API Endpoint

The application provides a REST API endpoint:

  • POST /generate
    • Request body: {"language": "your-language"}
    • Returns: {"dockerfile": "generated-dockerfile-content"}

About

Generate basic Dockerfiles for different programming languages with a local Ollama LLM module.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published