feat: select base image for buildpacks
This commit is contained in:
@@ -27,7 +27,7 @@ const createDockerfile = async (data, image, htaccessFound): Promise<void> => {
|
||||
};
|
||||
|
||||
export default async function (data) {
|
||||
const { workdir, baseDirectory } = data;
|
||||
const { workdir, baseDirectory, baseImage } = data;
|
||||
try {
|
||||
let htaccessFound = false;
|
||||
try {
|
||||
@@ -36,10 +36,7 @@ export default async function (data) {
|
||||
} catch (e) {
|
||||
//
|
||||
}
|
||||
const image = htaccessFound
|
||||
? 'webdevops/php-apache:8.0-alpine'
|
||||
: 'webdevops/php-nginx:8.0-alpine';
|
||||
await createDockerfile(data, image, htaccessFound);
|
||||
await createDockerfile(data, baseImage, htaccessFound);
|
||||
await buildImage(data);
|
||||
} catch (error) {
|
||||
throw error;
|
||||
|
||||
Reference in New Issue
Block a user