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

Clean-up downloaded files #73

Closed
csgillespie opened this issue Aug 11, 2019 · 4 comments
Closed

Clean-up downloaded files #73

csgillespie opened this issue Aug 11, 2019 · 4 comments

Comments

@csgillespie
Copy link
Contributor

In Dockerfiles it's standard to use something like:

install2.r XXX \
  && rm -rf  /tmp/downloaded_packages/

Could we make this:

  • an option in install2.r, e.g. -c would run rm -rf after install

If you are amiable, then:

  • default of TRUE would be nice, but I realise that changes previous behaviour
  • would you like a PR?
@eddelbuettel
Copy link
Owner

eddelbuettel commented Aug 11, 2019

i) Is it standard?
ii) Even if we said it were, why not clean in another spot?
iii) I actually like to have the tarballs (for a while) in /tmp/downloaded_packages/ -- I frequently poke into recent downloads / new packages with emacs.
iv) That said, we can add a new option to remove-on-demand as you say here.
v) I would want the default to be 'as is' i.e. "don't remove" but we could listen to an option(), say, to make this overrideable.
vi) So sure, a clean PR along those lines would work.

Your thoughts?

@csgillespie
Copy link
Contributor Author

i) Is it standard?

Good question. I do it. I've seen it a couple of other places. Not standard, but you
probably want to do it in a Dockerfile

ii) Even if we said it were, why not clean in another spot?

What other spot?

iii) I actually like to have the tarballs (for a while) in /tmp/downloaded_packages/ -- I frequently poke into recent downloads / new packages with emacs.

OK.

iv) That said, we can add a new option to remove-on-demand as you say here.

I don't have a strong opinion. I would use it. But ...

v) I would want the default to be 'as is' i.e. "don't remove" but we could listen to an option(), say, to make this overrideable.

Yep

vi) So sure, a clean PR along those lines would work.

OK. I'll have a stab next week

@eddelbuettel
Copy link
Owner

Re "what other spot": some of the Rocker Dockerfiles have plain old rm -f calls i them for this.

@csgillespie
Copy link
Contributor Author

After thinking about this, I'm not sure if this is the correct thing. I suspect I've been in docker world a bit too long.

Closing. If you think it is a good idea, then happy to submit a PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants