rocker-org / rocker

R configurations for Docker
https://rocker-project.org
GNU General Public License v2.0
1.45k stars 273 forks source link

how to create password for using rstudio docker #359

Closed chenhongbayer closed 4 years ago

chenhongbayer commented 4 years ago

from your documentation of running rocker/rstudio, it needs PASSWORD=, where do i go set up this password?

cboettig commented 4 years ago

apologies for the confusion, that's where you specify your own password -- anything you want, so long as it is a secret! (the password cannot be "rstudio").

chenhongbayer commented 4 years ago

great. thank you! I tried and got error below, not sure what issue it is: ubuntu@ip-172-31-38-113:~/rstudio-daily/latest$ docker build -t rstudio ./ Sending build context to Docker daemon 5.632kB Step 1/3 : FROM rocker/rstudio ---> 95f62e1bd0f4 Step 2/3 : RUN apt-get update && apt-get install -y --no-install-recommends libxml2-dev libssl-dev procps rrdtool libclang-dev && install2.r xml2 httr && wget --no-check-certificate https://raw.githubusercontent.com/rocker-org/rstudio-daily/master/latest.R && Rscript latest.R && rm latest.R ---> Using cache ---> a29238a4d24b Step 3/3 : RUN dpkg -i rstudio-server-daily-amd64.deb && rm rstudio-server-*-amd64.deb && ln -s -f /usr/lib/rstudio-server/bin/pandoc/pandoc /usr/local/bin && ln -s -f /usr/lib/rstudio-server/bin/pandoc/pandoc-citeproc /usr/local/bin && apt-get clean ---> Using cache ---> 256754dbb9c4 Successfully built 256754dbb9c4 Successfully tagged rstudio:latest ubuntu@ip-172-31-38-113:~/rstudio-daily/latest$ docker run -it -e PASSWORD=kSUtest rstudio [s6-init] making user provided files available at /var/run/s6/etc...exited 0. [s6-init] ensuring user provided files have correct perms...exited 0. [fix-attrs.d] applying ownership & permissions fixes... [fix-attrs.d] done. [cont-init.d] executing container initialization scripts... [cont-init.d] add: executing... Nothing additional to add [cont-init.d] add: exited 0. [cont-init.d] userconf: executing... [cont-init.d] userconf: exited 0. [cont-init.d] done. [services.d] starting services [services.d] done. 20 Sep 2019 16:45:19 [rserver] DEBUG (PID 208): Acquired lock: /var/run/rstudio-server/revocation-list.lock

20 Sep 2019 16:45:19 [rserver] DEBUG (PID 208): Released lock: /var/run/rstudio-server/revocation-list.lock

cboettig commented 4 years ago

Apologies again, those are not error messages! [services.d] done. is just telling you that it has successfully brought up RStudio for you, and is waiting for you to connect. Unfortunately you haven't bound an internet port, you probably wanted a -p 8787:8787 in your arguments to docker , see docs

chenhongbayer commented 4 years ago

got it. thank you for the help! actually my goal is pretty simple, which is to run a simple R script. So maybe instead of using rocker/rstudio, is there an image that has r-base + devtools that allow me to install python3-pip and libcurl4-openssl-dev libssl-dev libssh2-1-dev libxml2-dev on top of the image?

eddelbuettel commented 4 years ago

In that case you more-or-less started with the wrong container :)

Maybe scan our R Journal paper for an overview? Personally, I do a fair amount of customization on top of the r-base image that is the same as rocker/r-base.

chenhongbayer commented 4 years ago

thanks Carl and Dirk! I used r-base add on top of it a couple of developing tools building an image of my own and it eventually worked for my script.

eddelbuettel commented 4 years ago

Ok, if you're all good I will close this ticket.

chenhongbayer commented 4 years ago

Sure. Thanks!

Best regards,

Chenhong Zhang Data Manager

////////////////////

Bayer U.S. – Crop Science Research & Development 700 Chesterfield Pkwy West Building CC212-G Chesterfield, 63017, USA Tel: +1 636 737 7102 E-mail: chenhong.zhang@bayer.com Web: http://www.bayer.com

/// Follow Bayer on: /// Twitterhttps://twitter.com/Bayer /// Facebookhttps://www.facebook.com/Bayer /// Instagramhttps://www.instagram.com/bayerofficial/ /// LinkedInhttps://www.linkedin.com/company/1893/ /// YouTubehttps://www.youtube.com/user/BayerTVinternational ]

From: Dirk Eddelbuettel notifications@github.com Reply-To: rocker-org/rocker reply@reply.github.com Date: Monday, September 23, 2019 at 12:56 PM To: rocker-org/rocker rocker@noreply.github.com Cc: chenhongbayer chenhong.zhang@bayer.com, Author author@noreply.github.com Subject: Re: [rocker-org/rocker] how to create password for using rstudio docker (#359)

Ok, if you're all good I will close this ticket.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/rocker-org/rocker/issues/359?email_source=notifications&email_token=ANIFMFX5NFLCS7VHJ5CGOD3QLD7MBA5CNFSM4IYZBT62YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7LW7EQ#issuecomment-534212498, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ANIFMFVI7HL3QR2VZG42Z2DQLD7MBANCNFSM4IYZBT6Q. The information contained in this e-mail is for the exclusive use of the intended recipient(s) and may be confidential, proprietary, and/or legally privileged. Inadvertent disclosure of this message does not constitute a waiver of any privilege. If you receive this message in error, please do not directly or indirectly use, print, copy, forward, or disclose any part of this message. Please also delete this e-mail and all copies and notify the sender. Thank you.