Prerequisite
Install and set up docker
macOS
- Install docker from this site.
Windows
- To install docker desktop, you first need to install Windows Subsystem for Linux (version 2). Please follow instructions in this site.
- Once WSL2 is set up, install docker desktop from this site.
Clone container
- Clone my source code from my public repository for setting up a docker container by running the following in the terminal (the terminal in macOSX and in the WSL2 terminal in Windows).
git clone [email protected]:kohei-kawaguchi/docker_rstudio.git
- This creates a folder named
docker_rstudio. Move into the folder by running the following in the bash terminal:
cd docker_rstudio
- The file structure of this folder is:
.
├── docker-compose.yml
└── rstudio
└── Dockerfile
- The
docker-compose.yml looks like:
version: '3.2'
services:
rstudio:
image: docker_rstudio/rstudio:1.0
build: ./rstudio
container_name: 'docker_rstudio'
working_dir: '/home/rstudio'
volumes:
- ./rstudio/shared:/home/rstudio/shared
ports:
- 8787:8787
environment:
- DISABLE_AUTH=true
stdin_open: true
tty: true
- The
rstudio/Dockerfile looks like: