feat: LampScore implement dockerfile generation and image building #22

Merged
johnride merged 2 commits from feat/lampDocker into master 2025-04-27 19:56:30 +00:00
Showing only changes of commit f17948397f - Show all commits

View File

@ -101,8 +101,8 @@ impl<T: Topology + K8sclient> Interpret<T> for LAMPInterpret {
} }
} }
use dockerfile_builder::Dockerfile;
use dockerfile_builder::instruction::{CMD, COPY, ENV, EXPOSE, FROM, RUN, WORKDIR}; use dockerfile_builder::instruction::{CMD, COPY, ENV, EXPOSE, FROM, RUN, WORKDIR};
use dockerfile_builder::{Dockerfile, instruction_builder::EnvBuilder};
use std::fs; use std::fs;
impl LAMPInterpret { impl LAMPInterpret {
@ -126,9 +126,13 @@ impl LAMPInterpret {
// Set environment variables for PHP configuration // Set environment variables for PHP configuration
dockerfile.push(ENV::from("PHP_MEMORY_LIMIT=256M")); dockerfile.push(ENV::from("PHP_MEMORY_LIMIT=256M"));
dockerfile.push(ENV::from("PHP_MAX_EXECUTION_TIME=30")); dockerfile.push(ENV::from("PHP_MAX_EXECUTION_TIME=30"));
dockerfile.push(ENV::from( dockerfile.push(
"PHP_ERROR_REPORTING=E_ERROR | E_WARNING | E_PARSE", EnvBuilder::builder()
)); .key("PHP_ERROR_REPORTING")
.value("\"E_ERROR | E_WARNING | E_PARSE\"")
.build()
.unwrap(),
);
// Install necessary PHP extensions and dependencies // Install necessary PHP extensions and dependencies
dockerfile.push(RUN::from( dockerfile.push(RUN::from(