Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update r-base with apt-pinning #444

Merged
merged 3 commits into from
Feb 4, 2015
Merged

Conversation

cboettig
Copy link
Contributor

This commit resolves potential dependency problems that could occur in building the r-base image. The previous strategy used the Debian sources from CRAN to build the latest R image, but these reflect dependencies on Wheezy. We use Debian apt-pinning now to avoid this issue.

Update our fork with recent changes
Uses apt-pinning to install the latest version of R from debian:unstable.  (The previous strategy of installing the latest version of R from CRAN mirror could create dependency problems resulting in a failed build).
@tianon
Copy link
Member

tianon commented Jan 30, 2015

Just to simplify review: https://gist.github.com/tianon/5969b752837142352db8

I kept looking this over and thinking that this problem felt very, very familiar (like we'd discussed it before). Turns out we did: rocker-org/rocker#88 (comment) and rocker-org/rocker#88 (comment)

@cboettig
Copy link
Contributor Author

@tianon Thanks for the diff.

Yup, and apologies for that, at the time we'd forgotten about apt-pinning as a way to best address that issue. We feel this approach should provide the best of both worlds (robust builds without rolling back to ancient wheezy).

@yosifkit
Copy link
Member

yosifkit commented Feb 3, 2015

That sounds reasonable to me.

@tianon
Copy link
Member

tianon commented Feb 3, 2015

Why not just use APT::Default-Release instead of having a whole new file used with COPY?

# make sure "stable" is preferred for otherwise unspecified installs
RUN echo 'APT::Default-Release "stable";' > /etc/apt/apt.conf.d/default

@tianon
Copy link
Member

tianon commented Feb 3, 2015

Also, since you're already FROM debian:jessie and aren't adding any other suites except sid, it seems a little strange to have such a verbose and explicit preferences file.

@tianon
Copy link
Member

tianon commented Feb 3, 2015

To illustrate what I mean:

$ docker run -it --rm debian:jessie
root@a3962efb7c49:/# echo 'deb http://http.debian.net/debian sid main' > /etc/apt/sources.list.d/sid.list
root@a3962efb7c49:/# apt-get update
...
root@a3962efb7c49:/# apt-cache policy erlang
erlang:
  Installed: (none)
  Candidate: 1:17.3-dfsg-3
  Version table:
     1:17.3-dfsg-3 0
        500 http://http.debian.net/debian/ jessie/main amd64 Packages
        500 http://http.debian.net/debian/ sid/main amd64 Packages
root@a3962efb7c49:/# echo 'APT::Default-Release "jessie";' > /etc/apt/apt.conf.d/default
root@a3962efb7c49:/# apt-cache policy erlang
erlang:
  Installed: (none)
  Candidate: 1:17.3-dfsg-3
  Version table:
     1:17.3-dfsg-3 0
        990 http://http.debian.net/debian/ jessie/main amd64 Packages
        500 http://http.debian.net/debian/ sid/main amd64 Packages
root@a3962efb7c49:/# 

@eddelbuettel
Copy link
Contributor

I acknowledge that the two commands shown above by @tianon are "lighter-weight", but I would like to point out that we will end up with the exact same packages from sid as before: r-base, littler. Nothing really changes so this, and please pardon my French here, seems like bike shedding to me.

I may be missing something more fundamental. If so, please feel free to set me straight.

@eddelbuettel
Copy link
Contributor

But if this is what it takes to move forward we will adjust Dockerfiles, have'em built and will PR again.

@tianon
Copy link
Member

tianon commented Feb 4, 2015 via email

@eddelbuettel
Copy link
Contributor

Ohhh, I see. Instead of copying the preferences file in, get the same effect via the two echos you showed?

I buy that. Thanks for waving the cluebat. Will change.

@tianon
Copy link
Member

tianon commented Feb 4, 2015 via email

@tianon
Copy link
Member

tianon commented Feb 4, 2015

(if I really wanted to just bikeshed, you'd be changing whitespace right now too -- I try to keep the unnecessary bike-shedding to a minimum 😄)

@eddelbuettel
Copy link
Contributor

Hehe -- get yourself a 💯 ;-)

eddelbuettel added a commit to rocker-org/rocker that referenced this pull request Feb 4, 2015
@eddelbuettel
Copy link
Contributor

Guess it must be passed my bedtime here in flyover country if I put markdown into git comments. Oh boy.

@tianon
Copy link
Member

tianon commented Feb 4, 2015

Hah, you even did the totally over-the-top whitespace changes. ❤️ I feel buttered. 😄

Once this PR is updated I'll run a test build and I think we're good to go. 👍

@eddelbuettel
Copy link
Contributor

My pal and co-conspirator @cboettig is much more on top of these issues, but was too polite to trample over the r-base Dockerfile I had worked on last ;-)

@cboettig
Copy link
Contributor Author

cboettig commented Feb 4, 2015

Thanks for the feedback, PR updated.

@eddelbuettel
Copy link
Contributor

Looks we're good. Freshly built and pulled:

edd@max:~$ docker run --rm -ti rocker/r-base /bin/bash
root@f2ba3bf7ab40:/# R --version
R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet"
Copyright (C) 2014 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License versions 2 or 3.
For more information about these matters see
http://www.gnu.org/licenses/.

root@f2ba3bf7ab40:/# r --version
r ('littler') version 0.2.2

git revision 8df31e5 as of Thu Jan 29 17:43:21 2015 -0800
built at 12:53:44 on Jan 30 2015
using GNU R Version 3.1.2 (2014-10-31)

Copyright (C) 2006 - 2014  Jeffrey Horner and Dirk Eddelbuettel

r is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under the terms of the
GNU General Public License.  For more information about
these matters, see http://www.gnu.org/copyleft/gpl.html.

root@f2ba3bf7ab40:/# exit
edd@max:~$ docker images | grep r-base
rocker/r-base                latest              64f4276cbb9f        4 minutes ago       500 MB
r-base                       3.1.2               0ca81a0d7240        4 weeks ago         500.3 MB
r-base                       latest              0ca81a0d7240        4 weeks ago         500.3 MB
edd@max:~$ 

@tianon
Copy link
Member

tianon commented Feb 4, 2015

You guys are swell. ❤️

Thanks for being so easy to work with.

LGTM

Build test of #444; bad6eba (r-base):

$ bashbrew build https://raw.githubusercontent.com/docker-library/official-images/bad6eba14b06f08b60845b8d152c0a7c784cc6f5/library/r-base
Fetching r-base (git://github.com/rocker-org/rocker) ...
Processing r-base:latest ...
Processing r-base:3.1.2 ...

@tianon
Copy link
Member

tianon commented Feb 4, 2015

cc @yosifkit

@tianon tianon removed the moreinfo label Feb 4, 2015
@yosifkit
Copy link
Member

yosifkit commented Feb 4, 2015

LGTM

yosifkit added a commit that referenced this pull request Feb 4, 2015
Update r-base with apt-pinning
@yosifkit yosifkit merged commit fececf6 into docker-library:master Feb 4, 2015
@eddelbuettel
Copy link
Contributor

Yay! Thanks for the patience and repeated cluebat waves. Have a cookie!

@tianon
Copy link
Member

tianon commented Feb 4, 2015

@eddelbuettel
Copy link
Contributor

You win, again :)

legolaz8451 pushed a commit to legolaz8451/official-images that referenced this pull request Mar 14, 2024
Fix the Windows ordering in generate-stackbrew-library.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants