-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
64 lines (50 loc) · 1.51 KB
/
Dockerfile
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
# Dockerfile
# Use the rocker/rstudio image as the base image.
FROM rocker/rstudio:latest
# Update the linux system/ install apt-get packages.
RUN apt-get -y update && \
apt-get -y install \
libxt6 \
zlib1g-dev \
libpng-dev \
libpoppler-cpp-dev \
libxml2-dev \
libgit2-dev \
libcurl4-openssl-dev \
libfontconfig1-dev \
libssl-dev \
libharfbuzz-dev \
libfribidi-dev \
libfreetype6-dev \
libtiff5-dev \
libjpeg-dev \
cmake \
pandoc \
python3
# Clean up the apt-get installations.
RUN rm -rf /var/lib/apt/lists/*
# Add a line to the Rsession config.
RUN echo "copilot-enabled=1" >>/etc/rstudio/rsession.conf
# Add rstudio user to sudo group.
RUN usermod -aG sudo rstudio
# Set the working directory.
WORKDIR /home/rstudio
# Run as the rstudio user.
USER rstudio
# Copy the renv.lock file.
COPY renv.lock /home/rstudio/
# Create the Lessons directory.
RUN mkdir -p /home/rstudio/Lessons
# Create the Workspace directory for students' projects.
RUN mkdir -p /home/rstudio/Workspace
# Return to root.
USER root
# Copy rstudio-prefs.json
COPY rstudio-prefs.json /home/rstudio/.config/rstudio/rstudio-prefs.json
RUN chown rstudio:rstudio /home/rstudio/.config/rstudio/rstudio-prefs.json
# Add the swirl-setup.R file
COPY swirl-update.R /home/rstudio/Lessons/swirl-update.R
RUN chown rstudio:rstudio /home/rstudio/Lessons/swirl-update.R
# Add git-setup.sh file
COPY rstudio-setup.R /home/rstudio/rstudio-setup.R
RUN chown rstudio:rstudio /home/rstudio/rstudio-setup.R