Should .angular cache folder add to .dockerignore?

1.3k views Asked by At

Recently updated a Angular project with the ng update command from version 12 to version 13, at build time a new folder '.angular/cache' was created by Angular CLI, and in updates progress, adds this folder to the .gitignore file.
I want to know, Should the .angular cache folder add to .dockerignore? Is this action necessary or it is good practice?

1

There are 1 answers

0
Xesenix On

Depends on what do you want to have in your docker image. If its purpose is to only keep build version of your application you just need whatever was in dist folder. If its result is used to start different ng cli commands you may want to have cache available for them.