From Rainer at krugs.de  Mon Mar 24 09:41:42 2014
From: Rainer at krugs.de (Rainer M Krug)
Date: Mon, 24 Mar 2014 09:41:42 +0100
Subject: [Rd] Docker versus Vagrant for reproducability - was: The case
	for freezing CRAN
In-Reply-To: <532DBCAB.7060708@ivt.baug.ethz.ch> ("Kirill \=\?utf-8\?Q\?M\?\=
	\=\?utf-8\?Q\?\=C3\=BCller\=22's\?\= message of
	"Sat, 22 Mar 2014 17:39:07 +0100")
References: <3dfcdc$fuu13r@ironport9.mayo.edu>
	<21290.60882.865159.407363@max.nulle.part>
	<m21txv3maf.fsf_-_@krugs.de>
	<6C92022B-E12F-47CE-9143-D807F2D40278@umons.ac.be>
	<CABtg=KkSaXCwRLcD30ANQfGgEtPby+A1E17W5XfnGExhHPktEg@mail.gmail.com>
	<m2lhw31t7z.fsf@krugs.de>
	<CABtg=K=vr8uYcGCn3sTRRDqnnFYpQm_wmLUktopUG-Z0S9QzOQ@mail.gmail.com>
	<4529A5D9-1940-4C3C-BC60-A4E25F897873@umons.ac.be>
	<CAPJVwBkEAhS3SXzXK1Cacd+Zbv_6v9UZFDkc348Jv8yt7LYxNQ@mail.gmail.com>
	<532DBCAB.7060708@ivt.baug.ethz.ch>
Message-ID: <m2r45sount.fsf@krugs.de>

Thanks everybody for their input - interesting suggestions and useful
information - thanks.

But I am still struggling to use this information. What I got so far:

1) I have decided to try docker [1]
2) Installed docker and boot2docker on a Mac via homebrew and it works
3) I found some Dockerfiles to create an image with R and ssh
4) The dockerfile runs and creates the image
5) I can interactively connect to the image by using bash and R is
running there
5) As I am using emacs /  ess, I want to use ssh do R stuff (other
suggestions welcome)

Problems:
1) I don't manage to connect to the running docker image following [2] -
I even managed to freeze my computer while trying.
2) Even if I could, I understand that the ssh port would be different each
time - not very nice. Is there a way of setting the port?

Questions:

1) Am I right in saying, that I have to use ssh to access the running
image, or is there a (faster?) alternative? I mean - I am working
locally and I don't need any encryption.

2) Would Vagrant make the process easier?

And finally:

I think it would be great if this information could be collected in a
wiki page, as I did not find anything about the usage scenario of docker
/ vagrant discussed here - I will certainly see that I blog about my
tries.

Cheers,

Rainer

Kirill M?ller <kirill.mueller at ivt.baug.ethz.ch> writes:

> On 03/22/2014 02:10 PM, Nathaniel Smith wrote:
>> On 22 Mar 2014 12:38, "Philippe GROSJEAN" <Philippe.GROSJEAN at umons.ac.be>
>> wrote:
>>> On 21 Mar 2014, at 20:21, G??bor Cs??rdi <csardi.gabor at gmail.com> wrote:
>>>> In my opinion it is somewhat cumbersome to use this for everyday work,
>>>> although good virtualization software definitely helps.
>>>>
>>>> Gabor
>>>>
>>> Additional info: you access R into the VM from within the host by ssh.
>> You can enable x11 forwarding there and you also got GUI stuff. It works
>> like a charm, but there are still some problems on my side when I try to
>> disconnect and reconnect to the same R process. I can solve this with, say,
>> screen. However, if any X11 window is displayed while I disconnect, R
>> crashes immediately on reconnection.
>>
>> You might find the program 'xpra' useful. It's like screen, but for x11
>> programs.
>>
>> -n
> I second that. However, by default, xpra and GNU Screen are not aware
> of each other. To connect to xpra from within GNU Screen, you usually
> need to set the DISPLAY environment variable manually. I have
> described a solution that automates this, so that GUI applications
> "just work" from within GNU Screen and also survive a disconnect:
> http://krlmlr.github.io/integrating-xpra-with-screen/ .
>
>
> -Kirill
>


Footnotes: 
[1]  https://www.docker.io

[2]  http://docs.docker.io/en/latest/examples/running_ssh_service/

-- 
Rainer M. Krug
email: Rainer<at>krugs<dot>de
PGP: 0x0F52F982
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 494 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20140324/8a531819/attachment.bin>


[Rd] Docker versus Vagrant for reproducability - was: The case for freezing CRAN
Rainer M Krug