fix: remove .git dir from final image

This commit is contained in:
Andras Bacsai
2023-03-20 13:05:53 +01:00
parent 911c15d1be
commit bc6b1e2dea
12 changed files with 11 additions and 2 deletions

View File

@@ -29,6 +29,7 @@ const createDockerfile = async (data, image): Promise<void> => {
Dockerfile.push('RUN curl -f https://get.pnpm.io/v6.16.js | node - add --global pnpm@7');
}
Dockerfile.push(`COPY .${baseDirectory || ''} ./`);
Dockerfile.push('RUN rm -fr .git');
Dockerfile.push(`RUN ${installCommand}`);
if (buildCommand) {
Dockerfile.push(`RUN ${buildCommand}`);