Project Overview
This is a Docker containerization toolkit designed for development teams, providing a unified local development environment.
Through pre-configured Compose templates and automation scripts, it reduces the classic “works on my machine” problem.
PrerequisitesThis toolkit requires Docker Engine 24+ and Docker Compose v2.
Please ensure the correct versions are installed on your machine.
Features
- One-command startup for a complete development environment
- Multi-service docker-compose templates
- Environment variable management (automatic
.env template generation)
- Automated health checks and restart policies
- Separate configuration files for development / testing / production environments
Quick Start
-
Clone the project
git clone https://github.com/example/docker-toolkit.git
cd docker-toolkit
-
Initialize environment variables
-
Start services
-
Verify service status
Environment Configuration
# docker-compose.dev.yml
services:
app:
build:
context: .
target: development
volumes:
- .:/app
- /app/node_modules
ports:
- "3000:3000"
environment:
- NODE_ENV=development
# docker-compose.prod.yml
services:
app:
build:
context: .
target: production
ports:
- "8080:8080"
environment:
- NODE_ENV=production
restart: unless-stopped
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
interval: 30s
timeout: 10s
retries: 3
Project Structure
- docker-toolkit/
- docker-compose.yml
- docker-compose.dev.yml
- docker-compose.prod.yml
- .env.example
- scripts/
- init.sh
- health-check.sh
- backup.sh
- templates/
- nginx.conf
- Dockerfile.node
- Dockerfile.python