https://github.com/VincentGuyader/docker-localcran
use miniCRAN to localy create a CRAN repo snapshot using Docker
https://github.com/VincentGuyader/docker-localcran
Last synced: 4 months ago
JSON representation
use miniCRAN to localy create a CRAN repo snapshot using Docker
- Host: GitHub
- URL: https://github.com/VincentGuyader/docker-localcran
- Owner: VincentGuyader
- Created: 2020-07-06T12:06:25.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-27T14:14:16.000Z (over 2 years ago)
- Last Synced: 2025-06-16T12:53:16.551Z (6 months ago)
- Language: R
- Size: 9.77 KB
- Stars: 3
- Watchers: 1
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- jimsghstars - VincentGuyader/docker-localcran - use miniCRAN to localy create a CRAN repo snapshot using Docker (R)
README
# docker-localcran
use miniCRAN to localy create a CRAN repo snapshot using Docker
Using this Docker container you will be able to create a local CRAN snapshot
the Container is "smart" and only needed pacakges and dependencies will be downloaded ( ie : you can stop and rerun the process without loosing time)
# Build the image
```
docker build -t minicran -f Dockerfile_centos .
```
OR
```
docker build -t minicran -f Dockerfile_ubuntu .
```
This docker containe use by default the Posit Public Package Manager as repos see : .
Use `R_VERSION_DATE="2019-12-31"` to fix the snapshot date, you can also pass the full repos link with `CRAN_MIRROR=https://cran.rstudio.com/`
# Full snapshot (Download all available R package in the repos )
```
docker run -v local_path_to/miniCRAN:/miniCRAN -e R_VERSION_DATE="2020-07-05" -e FULL_SNAPSHOT=true minicran
```
# Partial snapshot
```
docker run -v local_path_to/miniCRAN:/miniCRAN -e R_VERSION_DATE="2020-07-05" --env-file=packages.list minicran
```
where `packages.list` is a file containing the list of packages to download :
```
PACKAGE_TO_DL=golem,rusk,tidyverse
```