feat: LampScore implement dockerfile generation and image building

- Added `build_dockerfile` function to generate a Dockerfile based on the LAMP stack for the given project.
- Implemented `build_docker_image` to execute the docker build command and create the image.
- Configured user and permissions for apache.
- Included necessary apache configuration for security.
- Added error handling for docker build failures.
- Exposed port 80 for external access.
- Added basic serialization to Config struct.
This commit is contained in:
2025-04-25 14:29:03 -04:00
parent 065e3904b8
commit 16a665241e
6 changed files with 226 additions and 11 deletions

23
Cargo.lock generated
View File

@@ -833,6 +833,28 @@ version = "0.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
[[package]]
name = "dockerfile_builder"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0ac372e31c7dd054d0fc69ca96ca36ee8d1cf79881683ad6f783c47aba3dc6e2"
dependencies = [
"dockerfile_builder_macros",
"eyre",
]
[[package]]
name = "dockerfile_builder_macros"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b627d9019ce257916c7ada6f233cf22e1e5246b6d9426b20610218afb7fd3ec9"
dependencies = [
"eyre",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "dyn-clone"
version = "1.0.19"
@@ -1363,6 +1385,7 @@ dependencies = [
"cidr",
"derive-new",
"directories",
"dockerfile_builder",
"env_logger",
"harmony_macros",
"harmony_types",