Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the unused pandoc and TeX installations from the RSPM image #300

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 19 additions & 4 deletions package-manager/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,28 @@
ARG R_VERSION=3.6.2
FROM rstudio/r-base:${R_VERSION}-bionic
FROM ubuntu:bionic
LABEL maintainer="RStudio Docker <[email protected]>"

# System dependendies and an R installation for package builds -----------------#
ARG R_VERSION=3.6.2
ARG R_DOWNLOAD_URL=https://cdn.rstudio.com/r/ubuntu-1804/pkgs
RUN apt-get update -qq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
ca-certificates \
curl \
locales \
&& curl -O ${R_DOWNLOAD_URL}/r-${R_VERSION}_1_amd64.deb \
&& DEBIAN_FRONTEND=noninteractive apt-get install -f -y ./r-${R_VERSION}_1_amd64.deb \
&& rm r-${R_VERSION}_1_amd64.deb \
&& rm -rf /var/lib/apt/lists/* \
&& ln -s /opt/R/${R_VERSION}/bin/R /usr/bin/R \
&& ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/bin/Rscript \
&& ln -s /opt/R/${R_VERSION}/lib/R /usr/lib/R
Comment on lines +16 to +18
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at this now, I think it was a mistake that we symlinked R to the OS default /usr/bin instead of /usr/local/bin in the rstudio/r-base images. The symlink to /usr/lib also isn't necessary at all, I copy pasted that from somewhere else 😬. I don't know if any users would ever want to switch their R versions here, but using /usr/local/bin would be nice for consistency with the instructions at https://docs.rstudio.com/resources/install-r/#create-a-symlink-to-r

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or we could remove it since RSPM doesn't need R to be on the PATH. Unless users might be running R scripts in this image.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I doubt that users would be running R scripts in this image 😮 At least I hope that would not be the case, I guess it is possible with some type of CI / etc. but definitely not a happy path recommendation 😄

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely not the happy path. I'll remove these symlinks.


# Locale configuration --------------------------------------------------------#
RUN localedef -i en_US -f UTF-8 en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ UTC

ENV PATH /opt/rstudio-pm/bin:$PATH

Expand All @@ -25,7 +40,7 @@ EXPOSE 2112/tcp
ARG RSPM_VERSION=2022.04.0-7
ARG RSPM_DOWNLOAD_URL=https://cdn.rstudio.com/package-manager/ubuntu/amd64
RUN apt-get update --fix-missing \
&& apt-get install -y --no-install-recommends gdebi-core dpkg-sig \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends gdebi-core dpkg-sig \
&& curl -O ${RSPM_DOWNLOAD_URL}/rstudio-pm_${RSPM_VERSION}_amd64.deb \
&& gpg --keyserver keyserver.ubuntu.com --recv-keys 3F32EE77E331692F \
&& dpkg-sig --verify rstudio-pm_${RSPM_VERSION}_amd64.deb \
Expand Down