fixing deno buldpack to not run main before copying directory

This commit is contained in:
Marcos Nery 2022-07-06 23:50:15 -03:00 committed by GitHub
parent c63237684a
commit cb01bbe4ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,9 +42,8 @@ const createDockerfile = async (data, image): Promise<void> => {
Dockerfile.push(`COPY .${baseDirectory || ''}/deps.ts /app`);
Dockerfile.push(`RUN deno cache deps.ts`);
}
Dockerfile.push(`COPY ${denoMainFile} /app`);
Dockerfile.push(`RUN deno cache ${denoMainFile}`);
Dockerfile.push(`COPY .${baseDirectory || ''} ./`);
Dockerfile.push(`RUN deno cache ${denoMainFile}`);
Dockerfile.push(`ENV NO_COLOR true`);
Dockerfile.push(`EXPOSE ${port}`);
Dockerfile.push(`CMD deno run ${denoOptions ? denoOptions.split(' ') : ''} ${denoMainFile}`);