Created
January 30, 2015 22:14
-
-
Save tianon/5969b752837142352db8 to your computer and use it in GitHub Desktop.
git --no-pager diff 105fca2b42051c5cd0894da31839c99a9b7de320:debian/r-base 56cb59cc262e9d2c02f9e11cfacab65f0b659c5f:r-base
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Dockerfile b/Dockerfile | |
index fc67592..ff25f25 100644 | |
--- a/Dockerfile | |
+++ b/Dockerfile | |
@@ -7,45 +7,48 @@ MAINTAINER "Carl Boettiger and Dirk Eddelbuettel" rocker-maintainers@eddelbuette | |
## Set a default user. Available via runtime flag `--user docker` | |
## Add user to 'staff' group, granting them write privileges to /usr/local/lib/R/site.library | |
-## User should also have & own a home directory (for rstudio or linked volumes to work properly). (could use adduser to create this automatically instead) | |
+## User should also have & own a home directory (for rstudio or linked volumes to work properly). | |
RUN useradd docker \ | |
-&& mkdir /home/docker \ | |
-&& chown docker:docker /home/docker \ | |
-&& addgroup docker staff | |
+ && mkdir /home/docker \ | |
+ && chown docker:docker /home/docker \ | |
+ && addgroup docker staff | |
-RUN apt-get update && apt-get install -y --no-install-recommends \ | |
+RUN apt-get update \ | |
+ && apt-get install -y --no-install-recommends \ | |
ed \ | |
less \ | |
locales \ | |
vim-tiny \ | |
- wget | |
+ wget \ | |
+ && rm -rf /var/lib/apt/lists/* | |
## Configure default locale, see https://github.com/rocker-org/rocker/issues/19 | |
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \ | |
-&& locale-gen en_US.utf8 \ | |
-&& /usr/sbin/update-locale LANG=en_US.UTF-8 | |
+ && locale-gen en_US.utf8 \ | |
+ && /usr/sbin/update-locale LANG=en_US.UTF-8 | |
+ | |
ENV LC_ALL en_US.UTF-8 | |
-## Use Debian repo at CRAN, and use RStudio CDN as mirror | |
-## This gets us updated r-base, r-base-dev, r-recommended and littler | |
-RUN apt-key adv --keyserver keys.gnupg.net --recv-key 381BA480 \ | |
-&& echo "deb http://cran.rstudio.com/bin/linux/debian wheezy-cran3/" > /etc/apt/sources.list.d/r-cran.list | |
+## Use Debian unstable via pinning (see apt-preferences.txt) | |
+RUN echo "deb http://http.debian.net/debian sid main" > /etc/apt/sources.list.d/debian-unstable.list | |
+COPY apt-preferences.txt /etc/apt/preferences.d/apt-pinning.pref | |
ENV R_BASE_VERSION 3.1.2 | |
## Now install R and littler, and create a link for littler in /usr/local/bin | |
-RUN apt-get update -qq \ | |
-&& apt-get install -y --no-install-recommends \ | |
- littler \ | |
+RUN apt-get update \ | |
+ && apt-get install -t unstable -y --no-install-recommends \ | |
+ littler/unstable \ | |
r-base=${R_BASE_VERSION}* \ | |
r-base-dev=${R_BASE_VERSION}* \ | |
r-recommended=${R_BASE_VERSION}* \ | |
-&& ln -s /usr/share/doc/littler/examples/install.r /usr/local/bin/install.r \ | |
-&& ln -s /usr/share/doc/littler/examples/install2.r /usr/local/bin/install2.r \ | |
-&& ln -s /usr/share/doc/littler/examples/installGithub.r /usr/local/bin/installGithub.r \ | |
-&& ln -s /usr/share/doc/littler/examples/testInstalled.r /usr/local/bin/testInstalled.r \ | |
-&& install.r docopt \ | |
-&& rm -rf /tmp/downloaded_packages/ /tmp/*.rds | |
+ && ln -s /usr/share/doc/littler/examples/install.r /usr/local/bin/install.r \ | |
+ && ln -s /usr/share/doc/littler/examples/install2.r /usr/local/bin/install2.r \ | |
+ && ln -s /usr/share/doc/littler/examples/installGithub.r /usr/local/bin/installGithub.r \ | |
+ && ln -s /usr/share/doc/littler/examples/testInstalled.r /usr/local/bin/testInstalled.r \ | |
+ && install.r docopt \ | |
+ && rm -rf /tmp/downloaded_packages/ /tmp/*.rds \ | |
+ && rm -rf /var/lib/apt/lists/* | |
## Set a default CRAN Repo | |
RUN echo 'options(repos = list(CRAN = "http://cran.rstudio.com/"))' >> /etc/R/Rprofile.site | |
diff --git a/apt-preferences.txt b/apt-preferences.txt | |
new file mode 100644 | |
index 0000000..427654c | |
--- /dev/null | |
+++ b/apt-preferences.txt | |
@@ -0,0 +1,18 @@ | |
+ | |
+## This is straight from Jacque's old HOWTO at | |
+## http://jaqque.sbih.org/kplug/apt-pinning.html | |
+## | |
+## Dirk Eddelbuettel, 19 Jan 2015 | |
+ | |
+Package: * | |
+Pin: release a=stable | |
+Pin-Priority: 700 | |
+ | |
+Package: * | |
+Pin: release a=testing | |
+Pin-Priority: 650 | |
+ | |
+Package: * | |
+Pin: release a=unstable | |
+Pin-Priority: 600 | |
+ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment