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

Use a path outside of /tmp for the cache if available #116

Closed
dmarti opened this issue Jul 17, 2020 · 3 comments
Closed

Use a path outside of /tmp for the cache if available #116

dmarti opened this issue Jul 17, 2020 · 3 comments
Labels
type:enhancement Small feature requests / adjustments

Comments

@dmarti
Copy link

dmarti commented Jul 17, 2020

On some systems, /tmp is a small tmpfs partition. This creates 2 problems for putting Earthly's cache there:

  • not enough space available for large builds

  • contents are lost on reboot

Consider checking for the /var/cache directory and putting Eartlhy's cache there if it is available.

related issue: Explore remote cache · Issue #11 · earthly/earthly

reference: Features/tmp-on-tmpfs - Fedora Project Wiki

@vladaionescu vladaionescu added the type:enhancement Small feature requests / adjustments label Jul 17, 2020
@vladaionescu
Copy link
Member

Good points.

A temporary workaround is to create a symbolic link from /tmp/earthly to some other location on the system.

@dmarti
Copy link
Author

dmarti commented Jul 17, 2020

Yes, that's how I have it working, thank you.

@alexcb
Copy link
Collaborator

alexcb commented Jul 21, 2020

@dmarti the next release of earthly will allow this to be changed by creating a file under ~/.earthly/config.yaml containing:

global:
  cache_path: "/path/to/earthly/cache"

We also changed it to default to /var/cache/earthly as you suggested. Thanks for reporting the issue.

@alexcb alexcb closed this as completed Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:enhancement Small feature requests / adjustments
Projects
None yet
Development

No branches or pull requests

3 participants