2015-09-09 20:37:20 +02:00
|
|
|
# Run RStudio in a container
|
|
|
|
#
|
|
|
|
# docker run -it \
|
|
|
|
# -v /tmp/.X11-unix:/tmp/.X11-unix \ # mount the X11 socket
|
|
|
|
# -e DISPLAY=unix$DISPLAY \
|
|
|
|
# -v $HOME/rscripts:/root/rscripts \
|
|
|
|
# --device /dev/dri \
|
|
|
|
# --name rstudio \
|
2018-06-14 12:50:45 +02:00
|
|
|
# jess/rstudio
|
2015-09-09 20:37:20 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
# Base docker image
|
2019-07-26 19:55:34 +02:00
|
|
|
FROM debian:bullseye-slim
|
2017-03-09 19:14:37 +01:00
|
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
2015-09-09 20:37:20 +02:00
|
|
|
|
2018-03-24 00:52:30 +01:00
|
|
|
# Install Rstudio deps
|
2015-09-09 20:37:20 +02:00
|
|
|
RUN apt-get update && apt-get install -y \
|
2019-07-26 19:55:34 +02:00
|
|
|
ca-certificates \
|
|
|
|
curl \
|
2015-09-10 03:24:36 +02:00
|
|
|
fcitx-frontend-qt5 \
|
2015-10-08 22:09:29 +02:00
|
|
|
fcitx-modules \
|
|
|
|
fcitx-module-dbus \
|
2019-07-26 19:55:34 +02:00
|
|
|
libasound2 \
|
2019-05-25 23:47:15 +02:00
|
|
|
libclang-dev \
|
2015-09-09 20:37:20 +02:00
|
|
|
libedit2 \
|
|
|
|
libgl1-mesa-dri \
|
|
|
|
libgl1-mesa-glx \
|
2019-07-26 19:55:34 +02:00
|
|
|
libgstreamer1.0-0 \
|
|
|
|
libgstreamer-plugins-base1.0-0 \
|
2015-09-09 20:37:20 +02:00
|
|
|
libjpeg-dev \
|
|
|
|
libjpeg62-turbo \
|
|
|
|
libjpeg62-turbo-dev \
|
2019-07-26 19:55:34 +02:00
|
|
|
libpresage1v5 \
|
2015-10-08 22:09:29 +02:00
|
|
|
libpresage-data \
|
2015-09-09 20:37:20 +02:00
|
|
|
libqt5core5a \
|
|
|
|
libqt5dbus5 \
|
|
|
|
libqt5gui5 \
|
|
|
|
libqt5network5 \
|
|
|
|
libqt5printsupport5 \
|
|
|
|
libqt5webkit5 \
|
|
|
|
libqt5widgets5 \
|
2019-07-26 19:55:34 +02:00
|
|
|
libnss3 \
|
2015-09-09 20:37:20 +02:00
|
|
|
libtiff5 \
|
|
|
|
libxcomposite1 \
|
2019-07-26 19:55:34 +02:00
|
|
|
libxcursor1 \
|
2015-09-09 20:37:20 +02:00
|
|
|
libxslt1.1 \
|
2019-07-26 19:55:34 +02:00
|
|
|
libxtst6 \
|
2015-09-10 03:24:36 +02:00
|
|
|
littler \
|
|
|
|
locales \
|
2015-09-09 20:37:20 +02:00
|
|
|
r-base \
|
|
|
|
r-base-dev \
|
|
|
|
r-recommended \
|
2015-09-10 03:24:36 +02:00
|
|
|
--no-install-recommends \
|
|
|
|
&& echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen \
|
|
|
|
&& locale-gen en_US.utf8 \
|
2015-10-08 22:09:29 +02:00
|
|
|
&& /usr/sbin/update-locale LANG=en_US.UTF-8 \
|
2018-03-24 00:52:30 +01:00
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
|
|
|
2018-06-20 04:50:18 +02:00
|
|
|
# https://www.rstudio.com/products/rstudio/download/#download
|
2019-05-25 23:41:09 +02:00
|
|
|
ENV RSTUDIO_VERSION 1.2.1335
|
2018-03-24 00:52:30 +01:00
|
|
|
|
|
|
|
# Download the source
|
2019-07-26 19:55:34 +02:00
|
|
|
RUN curl -sSL "https://download1.rstudio.org/desktop/bionic/amd64/rstudio-${RSTUDIO_VERSION}-amd64.deb" -o /tmp/rstudio-amd64.deb \
|
2018-03-24 00:52:30 +01:00
|
|
|
&& dpkg -i /tmp/rstudio-amd64.deb \
|
|
|
|
&& rm -rf /tmp/*.deb \
|
|
|
|
&& ln -f -s /usr/lib/rstudio/bin/rstudio /usr/bin/rstudio
|
|
|
|
|
2015-09-09 20:37:20 +02:00
|
|
|
|
2015-09-10 03:24:36 +02:00
|
|
|
ENV LC_ALL en_US.UTF-8
|
|
|
|
ENV LANG en_US.UTF-8
|
|
|
|
|
2015-09-09 20:37:20 +02:00
|
|
|
# Set default CRAN repo
|
2019-07-26 19:55:34 +02:00
|
|
|
RUN mkdir -p /etc/R \
|
|
|
|
&& echo 'options(repos = c(CRAN = "https://cran.rstudio.com/"), download.file.method = "libcurl")' >> /etc/R/Rprofile.site \
|
2015-09-10 03:24:36 +02:00
|
|
|
&& echo 'source("/etc/R/Rprofile.site")' >> /etc/littler.r \
|
|
|
|
&& ln -s /usr/share/doc/littler/examples/install.r /usr/local/bin/install.r \
|
|
|
|
&& ln -s /usr/share/doc/littler/examples/install2.r /usr/local/bin/install2.r \
|
|
|
|
&& ln -s /usr/share/doc/littler/examples/installGithub.r /usr/local/bin/installGithub.r \
|
|
|
|
&& ln -s /usr/share/doc/littler/examples/testInstalled.r /usr/local/bin/testInstalled.r \
|
|
|
|
&& rm -rf /tmp/downloaded_packages/ /tmp/*.rds \
|
|
|
|
&& echo '"\e[5~": history-search-backward' >> /etc/inputrc \
|
|
|
|
&& echo '"\e[6~": history-search-backward' >> /etc/inputrc
|
2015-09-09 20:37:20 +02:00
|
|
|
|
2019-07-26 19:55:34 +02:00
|
|
|
ENV HOME /home/user
|
|
|
|
RUN useradd --create-home --home-dir $HOME user \
|
|
|
|
&& chown -R user:user $HOME
|
|
|
|
|
|
|
|
WORKDIR $HOME
|
|
|
|
|
|
|
|
USER user
|
|
|
|
|
2015-09-09 20:37:20 +02:00
|
|
|
# Autorun Rstudio
|
|
|
|
ENTRYPOINT [ "rstudio" ]
|