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

@@ -9,6 +9,7 @@ const createDockerfile = async (data, image): Promise<void> => {
Dockerfile.push(`LABEL coolify.buildId=${buildId}`);
Dockerfile.push('WORKDIR /app');
Dockerfile.push(`COPY --from=${applicationId}:${tag}-cache /app${publishDirectory} ./`);
Dockerfile.push('RUN rm -fr .git');
if (baseImage?.includes('nginx')) {
Dockerfile.push(`COPY /nginx.conf /etc/nginx/nginx.conf`);
}