Skip to content

[BUG] Docker file built from renv lockfile has a syntax error #4

@nathansam

Description

@nathansam

Package Version

0.0.1

R Version

4.4.3

Operating System

macOS

Bug Description

Hi,

Thanks for creating this package. There is a syntax error in the resultant dockerfile when using dk_from_renv() where slashes are missing for the R calls e.g.:

RUN R -e "install.packages('renv', repos = 'https://cloud.r-project.org/')"
    R -e "renv::init()"
    R -e "renv::restore()"

Unfortunately this prevents a docker image from being built as there are no slashes or multiple RUN commands.

Steps to Reproduce

Call dk_from_renv() with any renv lockfile

Expected Behavior

'\' to be added to the end of R calls in the Dockerfile. E.g

RUN R -e "install.packages('renv', repos = 'https://cloud.r-project.org/')" \
    R -e "renv::init()" \
    R -e "renv::restore()"

Session Info

R version 4.4.3 (2025-02-28)
Platform: aarch64-apple-darwin20
Running under: macOS Sequoia 15.3.2

Matrix products: default
BLAS:   /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 
LAPACK: /Library/Frameworks/R.framework/Versions/4.4-arm64/Resources/lib/libRlapack.dylib;  LAPACK version 3.12.0

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

time zone: Europe/London
tzcode source: internal

attached base packages:
[1] stats     graphics  grDevices datasets  utils     methods   base     

other attached packages:
 [1] dockitect_0.0.1 lubridate_1.9.4 forcats_1.0.0   stringr_1.5.1   dplyr_1.1.4     purrr_1.0.4     readr_2.1.5     tidyr_1.3.1     tibble_3.2.1    ggplot2_3.5.1   tidyverse_2.0.0

loaded via a namespace (and not attached):
 [1] vctrs_0.6.5       cli_3.6.4         rlang_1.1.5       stringi_1.8.7     renv_1.1.4        generics_0.1.3    jsonlite_2.0.0    glue_1.8.0        colorspace_2.1-1 
[10] pak_0.8.0.1       hms_1.1.3         scales_1.3.0      grid_4.4.3        munsell_0.5.1     tzdb_0.5.0        yaml_2.3.10       lifecycle_1.0.4   compiler_4.4.3   
[19] timechange_0.3.0  pkgconfig_2.0.3   rstudioapi_0.17.1 R6_2.6.1          tidyselect_1.2.1  pillar_1.10.1     magrittr_2.0.3    tools_4.4.3       withr_3.0.2      
[28] gtable_0.3.6     

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions