a smart container configuration generator that works with any container runtime (Docker, Podman, OrbStack). born because i couldn't use docker init since i don't have docker desktop, and i had gotten tired of writing dockerfiles for quickly dockerizing my apps.
- 🔍 automatic framework detection
- 🎯 framework-specific optimized configurations (nextjs) only for now.
- 🛠 development & production setups
- 🔄 Multi-stage builds for optimization
- 🚀 Support for multiple container runtimes
- 📦 Easy service addition (databases, caches, etc.)
npm install -g docksmith
navigate to your project directory and run:
docksmith init
This will:
- Detect your project framework
- Ask for configuration preferences
- Generate optimized container configurations
# Initialize with default settings
docksmith init -y
# Specify framework manually
docksmith init -f nextjs
# Generate development configuration
docksmith init -d
# Specify custom port
docksmith init -p 8080
# Add a service to existing configuration
docksmith add database -t postgres (WIP)
# List available frameworks and services
docksmith list
Running docksmith init
generates:
Dockerfile
: optimized for your frameworkcompose.yaml
: container orchestration configuration.dockerignore
: framework-specific ignore patternsREADME.Docker.md
: usage instructions and configuration details
- Next.js (ONLY Available) ON THE LIST
- Express
- Flask
- Django
- FastAPI
- more coming soon...
- Docker
- Podman
- OrbStack
- Lima
-
initialize container configuration:
docksmith init -d
-
start development environment:
docker compose up
-
your application will be available with:
- Hot reload enabled
- Debug ports configured
- Volume mounts for live changes
-
generate production configuration:
docksmith init
-
Build and run:
docker compose up --build
add additional services to your configuration:
# Add PostgreSQL database
docksmith add database -t postgres
# Add Redis cache
docksmith add cache -t redis
- Fork the repository
- Create your feature branch
- Commit your changes
- Push to the branch
- Create a new Pull Request
MIT
To work on docksmith development:
-
Clone the repository:
git clone git@github.com:mosessmax/docksmith.git
-
Install dependencies:
cd docksmith npm install
-
Link for local development:
npm link
-
Run tests:
npm test