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

@@ -30,6 +30,7 @@ const createDockerfile = async (data, image): Promise<void> => {
`COPY --chown=application:application --from=${applicationId}:${tag}-cache /app/mix-manifest.json /app/public/mix-manifest.json`
);
Dockerfile.push(`COPY --chown=application:application . ./`);
Dockerfile.push('RUN rm -fr .git');
Dockerfile.push(`EXPOSE ${port}`);
await fs.writeFile(`${workdir}/Dockerfile`, Dockerfile.join('\n'));
};