-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.rstudio.yml
67 lines (67 loc) · 2.67 KB
/
docker-compose.rstudio.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Using:
# If on Linx, run the following first
# export UID=$UID
#
# docker-compose -f docker-compose.rstudio.yml up -d
# Open up http://hostname:8787
#
# To change the port, or you want to run multiple instances, specify the
# 2nd and on containers, run like so
# docker-compose -f docker-compose.rstudio.yml run -dp 8788:8787 rstudio
#
# The current directory will be mapped to /home/rstudio/seattle_flu
#
# Within the container, to install System packages
# Use the terminal within RStudio session and run
# sudo apt-get install -y <packge_name>
#
# To install R Packages, use the Package Manager
# within the RStudio session
# You may need system dependencies
# Any changes you make to running container it is good practice
# to add to the Dockerfile.RBuild.Env
#
# other useful commands:
# see what's up: docker-compose -f docker-compose.rstudio.yml ps
# bring container down: docker-compose -f docker-compose.rstudio.yml down -v
#
version: '3'
services:
rstudio:
build:
context: .
dockerfile: Dockerfile.RBuildEnv
# The below can be used to circumvent firewall issues or
# to use a caching proxy to reduce build times.
#args:
# - "HTTP_PROXY=${HTTP_PROXY:-}"
# - "HTTPS_PROXY=${HTTPS_PROXY:-}"
# - "FTP_PROXY=${FTP_PROXY:-}"
image: idm-docker-staging.packages.idmod.org/sfim_build_env:latest
environment:
- "DISABLE_AUTH=true"
- "USERID=${UID:-1000}"
- "GROUPID=${UID:-1000}"
- "ROOT=TRUE"
# Maps ports from Host -> Container
# Here we hap host 8787 to container 8787.
# Within the container RStudio runs on Port 8787
ports:
- "${HTTP_PORT:-8787}:8787"
# Here we map host volumes to container volumes
#
# Notice in this compose we map in scripts and data even though
# we added them in our dockerfile
# This allows us to modify the script/data and run inside the container
# and test new data or make changes to the script itself
volumes:
# This first volume allows you to pass your git config to the container
# Most likely, you want to set the src path to /home/<username>/.gitconfig
# On Windows, this file is located at C:\Users\<username>\.gitconfig
# Be sure the .gitconfig file exists before mapping it in.
# - "${HOME}/.gitconfig:/home/rstudio/.gitconfig"
# The following maps the pgpass and and pg_service.conf into the container
# - "${HOME}/.pgpass:/home/rstudio/.pg_pass"
# - "${HOME}/.pg_service.conf:/home/rstudio/.pg_service.conf"
# The below maps in the local directory to the seattle_flu directory within the container
- ./:/home/rstudio/seattle_flu