Skip to content

Commit 4a1a225

Browse files
Set the minimum version of the {pak} package to 0.6.0.
Parameterize the sysreqs_platform used to find system dependencies in pkg_sysreqs
1 parent 87976f4 commit 4a1a225

File tree

4 files changed

+10
-13
lines changed

4 files changed

+10
-13
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Imports:
2525
glue (>= 1.4.2),
2626
jsonlite (>= 1.7.2),
2727
memoise,
28-
pak (>= 0.2.0),
28+
pak (>= 0.6.0),
2929
pkgbuild (>= 1.2.0),
3030
purrr,
3131
R6 (>= 2.5.0),

NEWS.md

+3
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
- move from `pak::pkg_system_requirements` to `pak::pkg_sysreqs()` thanks to @B0ydT
55
- `dock_from_renv` allow to specify user to use in Dockerfile
66
- the `dependencies` parameter in `dock_from_renv` if set to `TRUE` will install required dependencies plus optional and development dependencies. defaut is `NA` only required (hard) dependencies,
7+
- Set the minimum version of the {pak} package to 0.6.0.
8+
- Parameterize the `sysreqs_platform` used to find system dependencies in pkg_sysreqs
9+
710

811
# dockerfiler 0.2.2
912

R/dock_from_renv.R

+3-6
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ pkg_sysreqs_mem <- memoise::memoise(
3131
#' dependencies,
3232
#' - `FALSE`: do not install any dependencies. (You might end up with a
3333
#' non-working package, and/or the installation might fail.)
34+
#' @param sysreqs_platform System requirements platform.`ubuntu` by default. If `NULL`, then the current platform is used. Can be : "ubuntu-22.04", or "rhel-9" if needed to fit with the `FROM` Operating System.
3435
#' @importFrom utils getFromNamespace
3536
#' @return A R6 object of class `Dockerfile`.
3637
#' @details
@@ -67,6 +68,7 @@ dock_from_renv <- function(
6768
use_pak = FALSE,
6869
user = NULL,
6970
dependencies = NA,
71+
sysreqs_platform = "ubuntu",
7072
renv_version
7173
) {
7274
try(dockerfiler::renv$initialize(),silent=TRUE)
@@ -100,12 +102,7 @@ dock_from_renv <- function(
100102
)
101103

102104

103-
# ici il faut connaire l'image utilisé par l'image.
104-
105-
106-
# distro_args <- list(sysreqs_platform = "ubuntu-22.04")
107-
108-
distro_args <- list(sysreqs_platform = "ubuntu")
105+
distro_args <- list(sysreqs_platform = sysreqs_platform)
109106

110107
install_cmd <- "apt-get install -y"
111108
update_cmd <-"apt-get update -y"

dev/flat_dock_from_renv.Rmd

+3-6
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ pkg_sysreqs_mem <- memoise::memoise(
7575
#' dependencies,
7676
#' - `FALSE`: do not install any dependencies. (You might end up with a
7777
#' non-working package, and/or the installation might fail.)
78+
#' @param sysreqs_platform System requirements platform.`ubuntu` by default. If `NULL`, then the current platform is used. Can be : "ubuntu-22.04", or "rhel-9" if needed to fit with the `FROM` Operating System.
7879
#' @importFrom utils getFromNamespace
7980
#' @return A R6 object of class `Dockerfile`.
8081
#' @details
@@ -106,6 +107,7 @@ dock_from_renv <- function(
106107
use_pak = FALSE,
107108
user = NULL,
108109
dependencies = NA,
110+
sysreqs_platform = "ubuntu",
109111
renv_version
110112
) {
111113
try(dockerfiler::renv$initialize(),silent=TRUE)
@@ -139,12 +141,7 @@ dock_from_renv <- function(
139141
)
140142
141143
142-
# ici il faut connaire l'image utilisé par l'image.
143-
144-
145-
# distro_args <- list(sysreqs_platform = "ubuntu-22.04")
146-
147-
distro_args <- list(sysreqs_platform = "ubuntu")
144+
distro_args <- list(sysreqs_platform = sysreqs_platform)
148145
149146
install_cmd <- "apt-get install -y"
150147
update_cmd <-"apt-get update -y"

0 commit comments

Comments
 (0)