Skip to content

Commit 901a58d

Browse files
committed
Install all R packages in one step with full dependencies
1 parent ac26df5 commit 901a58d

1 file changed

Lines changed: 1 addition & 7 deletions

File tree

Dockerfile

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
2828
&& rm -rf /var/lib/apt/lists/*
2929

3030
# Install R packages - use current CRAN since r-cran-curl provides compatible curl
31-
RUN R -q -e "options(repos = c(CRAN = 'https://cran.r-project.org'), Ncpus = 2); install.packages(c('magrittr', 'RCurl'), dependencies = c('Depends', 'Imports'))"
32-
33-
# Install tidyverse packages
34-
RUN R -q -e "options(repos = c(CRAN = 'https://cran.r-project.org'), Ncpus = 2); install.packages(c('dplyr', 'stringr'), dependencies = c('Depends', 'Imports'))"
35-
36-
# Install ggplot2
37-
RUN R -q -e "options(repos = c(CRAN = 'https://cran.r-project.org'), Ncpus = 2); install.packages('ggplot2', dependencies = c('Depends', 'Imports'))"
31+
RUN R -q -e "options(repos = c(CRAN = 'https://cran.r-project.org'), Ncpus = 2); install.packages(c('magrittr', 'RCurl', 'dplyr', 'stringr', 'ggplot2'))"
3832

3933
# Verify all packages installed successfully
4034
RUN R -q -e "required <- c('dplyr', 'magrittr', 'ggplot2', 'stringr', 'RCurl'); installed <- rownames(installed.packages()); missing <- setdiff(required, installed); if (length(missing) > 0) stop('Missing packages: ', paste(missing, collapse = ', ')); cat('All required packages installed successfully:\n'); cat(paste(required, collapse = ', '), '\n')"

0 commit comments

Comments
 (0)