ThinkR-open / dockerfiler

Easy Dockerfile Creation from R
https://thinkr-open.github.io/dockerfiler/
Other
176 stars 26 forks source link

dock_from_desc() // dockerfiler VS golem #7

Closed antoine-sachet closed 2 years ago

antoine-sachet commented 3 years ago

Golem has a more advanced dock_from_desc() function. Shouldn't it live in dockerfiler rather than golem?

ColinFay commented 3 years ago

Hey,

Yes, there's a plan on migrating everything from {golem} to here.

For the backstory: dock_from_desc() was first born in {dockerfiler}, then it was copied and pasted to {golem} (as a temporary solution before {dockerfiler} was on CRAN), then it evolved in {golem} :)

But yeah, the idea is to migrate every docker related things to {dockerfiler}, see https://github.com/ThinkR-open/golem/issues/412

statnmap commented 3 years ago

If you want to be able to install dependencies listed in DESCRIPTION, but also their sub-dependencies, you can use a code like this:

pkg_from_desc <- attachment::att_from_description()
the_sub_deps <- tools::package_dependencies(pkg_from_desc)
all_pkgs <- unique(c(pkg_from_desc, unlist(the_sub_deps)))

Indeed, this would also help dealing with dependencies in a {renv} context if you get all versions as well: https://github.com/ThinkR-open/golem/issues/282

ColinFay commented 2 years ago

{golem} now imports its dockerfile creation functions from {dockerfiler}

https://github.com/ThinkR-open/golem/commit/3c94f5a7e1d7b5b96f79ac6228664f8ba33f4983