Skip to content

abdylab/auto-dockerize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🐳 auto-dockerize

Dockerize any project automatically with one command — no configuration needed.

npm version author

✨ Features

  • 🔍 Auto-detects project type (React, Next.js, Angular, Express, NestJS, Spring Boot, Laravel)
  • 🌐 Reads real port from application.properties, .env, index.js...
  • 🎲 Picks a free random host port — no conflicts ever
  • 🗄️ Auto-adds MySQL or PostgreSQL service for backends
  • 🗑️ Remove command to clean all Docker files
  • 🚀 One command to dockerize any project

📦 Supported Frameworks

Framework Detected by DB
React (Vite) vite.config.js
Next.js next.config.js
Angular angular.json
Express / Node express in deps ✅ MySQL / PostgreSQL
NestJS @nestjs/core in deps ✅ MySQL / PostgreSQL
Spring Boot pom.xml ✅ MySQL / PostgreSQL
Laravel artisan ✅ MySQL / PostgreSQL

🚀 Usage

# Dockerize current project
npx @mohameden19961/auto-dockerize

# Remove Docker files from project
npx @mohameden19961/auto-dockerize remove

# Help
npx @mohameden19961/auto-dockerize help

📋 Example Output

🐳 Auto-Dockerize by @mohameden19961

📁 Projet détecté : /home/user/my-spring-app
🔍 Type détecté   : springboot
🌐 Port interne   : 8081
🚪 Port hôte      : 9247 (libre et aléatoire)

✅ Fichiers générés avec succès :
   → Dockerfile
   → docker-compose.yml
   → .dockerignore

🌍 Accès : http://localhost:9247
🗄️  DB port : 15032

📁 Generated Files

Dockerfile

Optimized multi-stage build for each framework.

docker-compose.yml

Includes app + database service with correct environment variables.

.dockerignore

Excludes node_modules, .git, .env, dist, build.

🛠️ Then just run

docker compose up --build

👤 Author

Abdy Mohameden — Full-Stack Dev | CS @ SUPNUM Mauritania

About

Dockerize any project automatically with one command

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors