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

howto save data? #123

Closed
davparker opened this issue May 7, 2015 · 5 comments
Closed

howto save data? #123

davparker opened this issue May 7, 2015 · 5 comments

Comments

@davparker
Copy link

So, I pulled "rocker/hadleyverse" into a "Docker 1.6.0 on 14.04" instance on DigitalOcean.com.
I run the process as follows:
docker run -d -p 8787:8787 -e USER=* -e PASSWORD=* -e ROOT=TRUE rocker/hadleyverse
Everything works great, except for the fact that any projects/docs I create in RStudio get destroyed every time I end the process. I can't figure out how to save any changes at all, even package installs/updates.
Granted I'm new to Docker. I'm not sure if this is a Docker issue, a DigitalOcean implementation, or just something to do with the RStudio server instance.

Thanks,
David

@eddelbuettel
Copy link
Member

You are running a single temporary process (which happens to spawn the RStudio Server instance) and its resources are temporary -- including disk.

To "keep" content you need to either save it across the network somewhere else, or you need to save your updated docker instances 'as is', see docker commit. I am not sure if that is easy or hard with digital ocean...

Adding packages can also be done by building your own Docker container which can be done starting from ours -- ie hadleyverse is both an extension of the rstudio container, and the basis of the further extension ropensci.

So in short: what you saw is just how Docker works. Ideal for deployment, testing, ... but it is not a virtual machine that stays as is.

@cboettig
Copy link
Member

cboettig commented May 7, 2015

@davparker Thanks for the feedback, I added a short page to this on the wiki: https://github.com/rocker-org/rocker/wiki/How-to-save-data (p.s. is the wiki helpful? e.g. is it obvious to check the wiki for this kind of thing?)

There are many ways to go about saving data, but docker commit is a particularly cool one, especially when working with a cloud instance that you don't intend to be leaving up all the time.

@davparker
Copy link
Author

Thanks for the feedback. I'll have to try DigitalOcean again. I want to say I had issues trying to commit while the instance was running. But maybe not.

My goal is to run RStudio in the cloud so I can do course work from any connected device. And obviously to save all my work. I installed Docker on my home Windows computer. I have pulled this package and can run it as a daemon, but I can't connect to it via IP. I'm not sure if its a Virtual Box issue or what. My plan was to customize it then have it ready to deploy somewhere. I seem to be getting nowhere. I've checked my firewall settings and have tcp/8787 allowed.

Docker reports the IP as 172.17.0.3. An ipconfig in the shell reports
VirtualBox Host-Only Network: 192.168.59.1
VirtualBox Host-Only Network #2:192.168.59.3

I'm guessing the IP is NAT'ed and Virtual Box is preventing access. Telnet to port 8787 gives nothing. I've tried every IP address, including localhost:
http://ipaddress:8787/

I think Docker isn't well suited for a Windows environment.

$ docker ps
CONTAINER ID        IMAGE                       COMMAND                CREATED             STATUS              PORTS                              NAMES
98c4616b0b23        rocker/hadleyverse:latest   "/usr/bin/supervisor   33 minutes ago      Up 33 minutes       1410/tcp, 0.0.0.0:8787->8787/tcp   compassionate_hypatia
David@TINY ~
$ docker ps -l
CONTAINER ID        IMAGE                       COMMAND                CREATED             STATUS              PORTS                              NAMES
98c4616b0b23        rocker/hadleyverse:latest   "/usr/bin/supervisor   33 minutes ago      Up 33 minutes       1410/tcp, 0.0.0.0:8787->8787/tcp   compassionate_hypatia

@eddelbuettel
Copy link
Member

Did you try 172.17.0.3:8787 to connect to the RStudio instance running on your Windows box?

@cboettig
Copy link
Member

closing since it looks like we've addressed this, please re-open if still an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants