Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest yarn cache clean when yarn [install] was run #395

Closed
2 of 3 tasks
SuperSandro2000 opened this issue Feb 15, 2020 · 1 comment · Fixed by #592
Closed
2 of 3 tasks

Suggest yarn cache clean when yarn [install] was run #395

SuperSandro2000 opened this issue Feb 15, 2020 · 1 comment · Fixed by #592

Comments

@SuperSandro2000
Copy link
Contributor

  • This is a bug report
  • This is a feature request
  • I searched existing issues before opening this one

Suggestion

Yarn can generate quite large caches that can easily be 100MB or 300MB big.
I think hadolint should tell you to use yarn cache clean in the same layer you installed something to avoid keeping those caches in the final image.

@ghostsquad
Copy link

Or use a multiple stages, which is likely better anyway, since you may need to install dev dependencies, then uninstall those before finalizing the final image.

m-ildefons added a commit to m-ildefons/hadolint that referenced this issue Apr 3, 2021
- Add new rule DL3060 linting for `yarn cache clean` after `yarn
  install` with severity `DLInfoC`
- Add tests

This rule reminds the odd programmer about cleaning `yarn`s caches after
installing, just like with the other package managers.
lorenzo pushed a commit that referenced this issue Apr 5, 2021
- Add new rule DL3060 linting for `yarn cache clean` after `yarn
  install` with severity `DLInfoC`
- Add tests

This rule reminds the odd programmer about cleaning `yarn`s caches after
installing, just like with the other package managers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants