rocker-org / rocker

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

Creating multiple rocker containers on different ports #388

Closed achamess closed 4 years ago

achamess commented 4 years ago

Hi, I've been using Rocker successfully to run genomics analyses. But I'm at the stage now where I want to create multiple separate Rocker containers for different projects. I'm assuming the way to do that is to assign to different ports. The default I know is 8787

This is a naive question since I'm new to docker, but what other ports can I use? In other words, what other numbers besides 8787 can I assign for my containers? I've tried just random other four-digit numbers and it doesn't work. Any guidance would be appreciated.

eddelbuettel commented 4 years ago

When you say "port" and only mention "8787", do you mean for multiple RStudio instances? You may be running into an RStudio design issue---the daemon service providing RStudio Server (by default) only offers 8787.

That said, you can run multiple services on multiple ports. But doing so is more general "how do I ..." question for Unix and not Rocker-specific and we do not have the bandwidth to coach that here. Maybe try https://unix.stackexchange.com or https://serverfault.com/ -- or the RStudio Community site.

cboettig commented 4 years ago

@achamess just a quick note you can change which port you use on the host while always using 8787 in the container. This lets you have lots of instances on the same host. e.g.

docker run -p 8787:8787 ...
dicker run -p 8888:8787 ...
docker run -p 8989:8787 ...

etc.

You could also consider setting up a reverse proxy server (like caddyserver) in front of your instance with different subdomain names for each instance.

achamess commented 4 years ago

Thank you! That's helpful. My question was also about which numbers are permissible before the 8787 (e.g. 8989, 8888, etc). I'll figure it out. But I appreciate your help.

Best, Alex


From: Carl Boettiger notifications@github.com Sent: Monday, March 30, 2020 4:03 PM To: rocker-org/rocker rocker@noreply.github.com Cc: Alex Chamessian alexander.chamessian@duke.edu; Mention mention@noreply.github.com Subject: Re: [rocker-org/rocker] Creating multiple rocker containers on different ports (#388)

@achamesshttps://urldefense.com/v3/__https://github.com/achamess__;!!OToaGQ!9joE8e5_Xr5P1tUC3RoGMdlwY7NGdA-EXXBuP-_aAT_RErEZm09FfwfvpsU46zk$ just a quick note you can change which port you use on the host while always using 8787 in the container. This lets you have lots of instances on the same host. e.g.

docker run -p 8787:8787 ... dicker run -p 8888:8787 ... docker run -p 8989:8787 ...

etc.

You could also consider setting up a reverse proxy server (like caddyserver) in front of your instance with different subdomain names for each instance.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.com/v3/__https://github.com/rocker-org/rocker/issues/388*issuecomment-606215577__;Iw!!OToaGQ!9joE8e5_Xr5P1tUC3RoGMdlwY7NGdA-EXXBuP-_aAT_RErEZm09FfwfvvYlGEjo$, or unsubscribehttps://urldefense.com/v3/__https://github.com/notifications/unsubscribe-auth/ABYZW4QAA7J2YL7IKHBR5XLRKD3IZANCNFSM4LWA5JBQ__;!!OToaGQ!9joE8e5_Xr5P1tUC3RoGMdlwY7NGdA-EXXBuP-_aAT_RErEZm09FfwfvzX0-mo8$.