svenvanderwegen/dockerizer
Composer 安装命令:
composer require svenvanderwegen/dockerizer
包简介
A PHP package to create a Dockerfile for your Laravel project
README 文档
README
Dockerizer
Dockerizer is a command line tool that helps you create Docker images for your PHP applications. It generates a Dockerfile and a docker-compose.yml file based on your application's configuration.
Installation
You can install the package via Composer:
composer require --dev svenvanderwegen/dockerizer:dev-master --prefer-dist
Features & Functionality
Dockerizer provides a streamlined workflow to containerize your PHP application with minimal effort. The core functionality is exposed through two main Artisan commands:
1. dockerizer:setup
- Launches an interactive setup wizard.
- Prompts you to select:
- Container registry (Docker Hub, GitHub, custom, etc.)
- Repository path and (if custom) registry URL
- Database type (MySQL, PostgreSQL, SQLite)
- Optional services: Redis, queue worker, scheduler
- Saves your choices to
.dockerizer/config.json.
2. dockerizer:build
- Generates all required Docker files for your application based on the configuration.
- Creates:
- Dockerfile(s) and service stubs
docker-compose.ymlwith all enabled services (app, nginx, database, redis, worker, scheduler, etc.)- Necessary directories and GitHub Actions workflow files
- Supports a
--forceoption to overwrite existing files
Modular Service Classes
- Each Docker service (App, Nginx, Database, Redis, Worker, Scheduler) is encapsulated in its own class.
- Only services enabled in your configuration are included in the generated compose file.
- Easily extendable for additional services.
Requires PHP 8.3+
Dockerizer was created by Sven Vanderwegen under the MIT license.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-30
