-
Notifications
You must be signed in to change notification settings - Fork 2
/
README.Rmd
352 lines (288 loc) · 11.1 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
---
title: Run historical R versions on today's computers
output:
github_document:
toc: true
toc_depth: 2
editor_options:
markdown:
wrap: 72
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
out.width = "100%"
)
```
## Experimental!
Note that these containers are currently experimental!
Found a bug?
[Please let us know!](https://github.com/r-hub/evercran/issues/new)
Thanks!
## TL;DR
```sh
docker pull ghcr.io/r-hub/evercran/1.0.0
docker run -ti ghcr.io/r-hub/evercran/1.0.0
```
```
R : Copyright 2000, The R Development Core Team
Version 1.0.0 (February 29, 2000)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type "?license" or "?licence" for distribution details.
R is a collaborative project with many contributors.
Type "?contributors" for a list.
Type "demo()" for some demos, "help()" for on-line help, or
"help.start()" for a HTML browser interface to help.
Type "q()" to quit R.
>
```
## The evercran CRAN snapshots
The evercran project has daily CRAN snapshots, starting from the very
beginning up to today. The URLs are of the form
```
http://evercran.r-pkg.org/YYYY/MM/DD
https://evercran.r-pkg.org/YYYY/MM/DD
```
and they start at 1999/01/01.
Package downloads are redirected to CRAN, so you will need an R download
method that follows redirection.
All the evercran containers (from R 0.65.1) in this repository are already
set up to an appropriate evercran snapshot: they use the date of the
*next* R release. (Except for the container of the latest R release, of
course, that uses a regular CRAN mirror instead of a snapshot.)
To use an evercran snapshot on a different R installation,
this should work on all R versions, as of today:
```
options(CRAN = "http://evercran.r-pkg.org/2010/10/10")
options(repos = c(CRAN = "http://evercran.r-pkg.org/2010/10/10"))
options(download.file.method = "wget")
```
Modify the URLs to use the snapshot date you'd like.
Add this to the `~/.Rprofile` file.
You'll also need to install `wget` for the downloads to
work.
You can use a https URL if your `wget` installation supports https.
## Interactive R shell on GitHub Actions
You can also run any R version interactively on GitHub Actions,
using the [`r-hub/evercran-shell`](
https://github.com/r-hub/evercran-shell#readme) repository. You
only need an SSH client for this. See [`r-hub/evercran-shell`](
https://github.com/r-hub/evercran-shell#readme) for the details.
## R 0.0 (alpha-test) -- R 2.5.1
```sh
docker pull ghcr.io/r-hub/evercran/<version>
docker run -ti ghcr.io/r-hub/evercran/<version>
```
These containers use Debian 3.1 (Sarge). Notes:
* All containers use the `linux/i386` architecture.
* While `wget` and `curl` have HTTPS support, in practice HTTPS
does not work because of certificate errors.
* You can use the HTTP (not HTTPS!) PPA at https://ppa.r-pkg.org/evercran/
to install more R versions:
```sh
echo 'deb http://ppa.r-pkg.org/evercran sarge main' \
>> /etc/apt/sources.list
apt-get update -y
apt-get install -y r-1.0.0
```
* The Debian R packages are also available as GitHub Releases, in the
https://github.com/r-hub/R repository, e.g.:
https://github.com/r-hub/R/releases/tag/v1.0.0
(But you cannot directly download these from the containers, because
of the broken HTTPS. Use the PPA to download them.)
## R 2.6.0 -- R 2.8.1
```sh
docker pull ghcr.io/r-hub/evercran/<version>
docker run -ti ghcr.io/r-hub/evercran/<version>
```
These containers use Debian 4.0 (Etch). Notes:
* All containers use the `linux/i386` architecture.
* While `wget` and `curl` have HTTPS support, in practice HTTPS
does not work well, because they use TLS v1, which is not supported by many
servers.
* You can use the HTTP (not HTTPS!) PPA at https://ppa.r-pkg.org/evercran/
to install more R versions:
```sh
echo 'deb http://ppa.r-pkg.org/evercran etch main' \
>> /etc/apt/sources.list
curl -L http://ppa.r-pkg.org/rhub.gpg.key | apt-key add -
apt-get update -y
apt-get install -y r-2.6.0
```
* The Debian R packages are also available as GitHub Releases, in the
https://github.com/r-hub/R repository, e.g.:
https://github.com/r-hub/R/releases/tag/v2.6.0
(But you cannot directly download these from the containers, because
of the broken HTTPS. Use the PPA to download them.)
## R 2.9.0 -- R 2.12.2
```sh
docker pull ghcr.io/r-hub/evercran/<version>
docker run -ti ghcr.io/r-hub/evercran/<version>
```
These containers use Debian 5.0.10 (Lenny). Notes:
* All containers use the `linux/i386` architecture.
* While `wget` and `curl` have HTTPS support, in practice HTTPS
does not work well, because they use TLS v1, which is not supported by many
servers.
* You can use the HTTP (not HTTPS!) PPA at https://ppa.r-pkg.org/evercran/
to install more R versions:
```sh
echo 'deb http://ppa.r-pkg.org/evercran lenny main' \
>> /etc/apt/sources.list
curl -L http://ppa.r-pkg.org/rhub.gpg.key | apt-key add -
apt-get update -y
apt-get install -y r-2.9.0
```
* The Debian R packages are also available as GitHub Releases, in the
https://github.com/r-hub/R repository, e.g.:
https://github.com/r-hub/R/releases/tag/v2.9.0
(But you cannot directly download these from the containers, because
of the broken HTTPS. Use the PPA to download them.)
## R 2.13.0 -- R 2.15.3
```sh
docker pull ghcr.io/r-hub/evercran/<version>
docker run -ti ghcr.io/r-hub/evercran/<version>
```
These containers use Debian 6.0.10 (Squeeze). Notes:
* All containers use the `linux/i386` architecture.
* While `wget` and `curl` have HTTPS support, in practice HTTPS
does not work well, because they use TLS v1, which is not supported by many
servers.
* You can use the HTTP (not HTTPS!) PPA at https://ppa.r-pkg.org/evercran/
to install more R versions:
```sh
echo 'deb http://ppa.r-pkg.org/evercran squeeze main' \
>> /etc/apt/sources.list
curl -L http://ppa.r-pkg.org/rhub.gpg.key | apt-key add -
apt-get update -y
apt-get install -y r-2.13.0
```
* The Debian R packages are also available as GitHub Releases, in the
https://github.com/r-hub/R repository, e.g.:
https://github.com/r-hub/R/releases/tag/v2.13.0
(But you cannot directly download these from the containers, because
of the broken HTTPS. Use the PPA to download them.)
## R 3.0.0 -- R 4.4.2
```sh
docker pull ghcr.io/r-hub/evercran/<version>
docker run -ti ghcr.io/r-hub/evercran/<version>
```
These containers use Debian 12.1 (Bookworm). Notes:
* All containers are available with `linux/amd64` and `linux/arm64`
architectures.
* The amd64 Debian packages are available from
https://github.com/rstudio/r-builds.
* The arm64 Debian packages are available from the GitHub Releases at the
https://github.com/r-hub/R repository E.g.
https://github.com/r-hub/R/releases/tag/v4.3.1.
* To install additional R versions (or to install in a plain
`debian:12` container), download it with `wget` or `curl`, and install it
with `apt install ./<filename>`. E.g.:
```sh
apt-get update
apt-get install -y curl
curl -LO https://github.com/r-hub/R/releases/download/v4.3.1/r-rstudio-debian-12-4.3.1_1_arm64.deb
apt install -y ./r-rstudio-debian-12-4.3.1_1_arm64.deb
/opt/R/4.3.1/bin/R
```
## Containers with multiple R versions
For convenience we have containers that include many R versions installed.
All R versions are installed in `/opt/R/<version>`, so you can run one with
```
/opt/R/<version>/bin/R
```
For example to run R 0.65.1:
```
/opt/R/0.65.1/bin/R
```
| R versions | Container | OS |
|:---------------------------------------|:-----------------------------|:------------------------|
| R 0.0 (alpha-test) -- R 0.16.1 (alpha) | `ghcr.io/r-hub/evercran/pre` | Debian Sarge 3.1 i386 |
| R 0.49 -- R 1.0.0 | `ghcr.io/r-hub/evercran/0.x` | Debian Sarge 3.1 i386 |
| R 1.0.0 -- R 1.9.1 | `ghcr.io/r-hub/evercran/1.x` | Debian Sarge 3.1 i386 |
| R 2.0.0 -- R 2.15.3 | `ghcr.io/r-hub/evercran/2.x` | Debian Wheezy 7.11 i386 |
## List of all containers
```{r, results = "asis", echo = FALSE}
writeLines("| R version | Container | Platform | OS |")
writeLines("|:----------|:----------|:---------|:---|")
rv <- readLines("containers/versions-prerelease.txt")
lab <- paste(rv, "(alpha)")
lab[1] <- "0.0 (alpha-test)"
writeLines(sprintf(
"| R %s | `ghcr.io/r-hub/evercran/%s` | `linux/i386` | Debian Sarge 3.1 |",
format(lab), format(rv)
))
rv <- readLines("containers/versions-sarge.txt")
writeLines(sprintf(
"| R %s | `ghcr.io/r-hub/evercran/%s` | `linux/i386` | Debian Sarge 3.1 |",
format(rv), format(rv)
))
rv <- readLines("containers/versions-etch.txt")
writeLines(sprintf(
"| R %s | `ghcr.io/r-hub/evercran/%s` | `linux/i386` | Debian Etch 4.0r9 |",
format(rv), format(rv)
))
rv <- readLines("containers/versions-lenny.txt")
writeLines(sprintf(
"| R %s | `ghcr.io/r-hub/evercran/%s` | `linux/i386` | Debian Lenny 5.0.10 |",
format(rv), format(rv)
))
rv <- readLines("containers/versions-squeeze.txt")
writeLines(sprintf(
"| R %s | `ghcr.io/r-hub/evercran/%s` | `linux/i386` | Debian Squeeze 6.0.10 |",
format(rv), format(rv)
))
rv <- readLines("containers/versions-bookworm.txt")
writeLines(sprintf(
"| R %s | `ghcr.io/r-hub/evercran/%s` | `linux/amd64`, `linux/arm64`| Debian bookworm 12.1 |",
format(rv), format(rv)
))
```
## Frequently asked questions
<details>
<summary>Why does `list.files()` return an empty vector?</summary>
If you see something like
```
> list.files("/opt/R")
character(0)
```
then you need to run the entry point of the container, see the question
after the next one.
</details>
<details>
<summary>
Why is the architecture detected as `x86_64` instead of `i386`?
</summary>
You need to run the entry point of the container, see the next question.
</details>
<details>
<summary>`docker run` works, but `docker exec` does not, why?</summary>
Running 32bit (`i386`) containers on arm64 and amd64 platforms is tricky,
and to make everything work properly, we need to run a special entry point.
This entry point runs with `docker run`, but it does not for `docker exec`,
and you need to run it manually:
```
docker exec -it <container> entrypoint.sh bash
```
If you don't run the entry point then on arm64 hosts you might get file
system errors (https://github.com/r-hub/evercran/issues/7). On amd64
platforms typically the architecture will be mis-detected
(https://github.com/r-hub/evercran/issues/3).
</details>
## Similar projects, inspiration
* [rcheology](https://github.com/hughjonesd/rcheology) --
Data on Base Packages for Previous Versions of R
* [rang](https://github.com/chainsawriot/rang) --
(Re)constructing R computational environments
## Thanks!
* [debian/eol](https://hub.docker.com/r/debian/eol/) --
End of Life Debian versions (pointing at archive.debian.org)
* Posit's https://github.com/rstudio/r-builds project.
## License
See https://www.r-project.org/Licenses/ for the R licenses
The Dockerfiles and tools in this repository are licensed under the
MIT License.
© [R Consortium](https://github.com/rconsortium)