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

add a posit user to the base content container #475

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
18 changes: 14 additions & 4 deletions content/base/Dockerfile.ubuntu1804
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ RUN apt-get update \
# System dependencies needed by popular R packages
# https://docs.rstudio.com/rsc/post-setup-tool/#install-system-dependencies

# Now, install the system requirements for R packages.
# Now, install the system requirements for R and Python packages.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
default-jdk \
Expand Down Expand Up @@ -90,7 +90,7 @@ RUN apt-get update \

# Reference: https://docs.rstudio.com/resources/install-r/

# We are NOT linking one of these R versions into the PATH.
# The version of R is NOT added to the PATH

ARG R_DISTRIBUTION=ubuntu-1804

Expand All @@ -107,7 +107,7 @@ RUN curl -fsSL -O https://cdn.rstudio.com/r/${R_DISTRIBUTION}/pkgs/${R_INSTALLER

# Reference: https://docs.rstudio.com/resources/install-python/

# We are NOT linking one of these Python versions into the PATH.
# This version of python is NOT added to the PATH

ARG MINICONDA_VERSION=4.7.12.1
ARG PYTHON_VERSION=3.7.6
Expand All @@ -124,9 +124,19 @@ RUN curl -fsSL -o miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-${
# remove miniconda too, for size
&& rm -rf /opt/miniconda

# install quarto
# Install Quarto --------------------------------------------------------------#
Copy link
Contributor

Choose a reason for hiding this comment

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

Link to https://docs.posit.co/resources/install-quarto/ and add the same "not on my PATH" comment.


# Reference: https://docs.posit.co/resources/install-quarto/

# This version of quarto is NOT added to the PATH

ARG QUARTO_VERSION=1.0.37
COPY maybe_install_quarto.sh /tmp/maybe_install_quarto.sh
RUN /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.rstudio.com/cran/__linux__/bionic/latest")' \
&& /tmp/maybe_install_quarto.sh \
&& rm -f /tmp/maybe_install_quarto.sh

# Add a posit user / group --------------------------------------------------------------#

RUN groupadd -g 999 -r posit && \
useradd -r -u 999 -g 999 -M posit
19 changes: 15 additions & 4 deletions content/base/Dockerfile.ubuntu2204
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ RUN apt-get update \
# System dependencies needed by popular R packages
# https://docs.rstudio.com/rsc/post-setup-tool/#install-system-dependencies

# Now, install the system requirements for R packages.
# Now, install the system requirements for R and Python packages.
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
default-jdk \
Expand Down Expand Up @@ -97,7 +97,8 @@ RUN apt-get update \

# Reference: https://docs.rstudio.com/resources/install-r/

# We are NOT linking one of these R versions into the PATH.
# The version of R is NOT added to the PATH

RUN curl -fsSL -O https://cdn.rstudio.com/r/${DISTRIBUTION}/pkgs/${R_INSTALLER} \
&& apt-get update \
&& apt-get install -f -y --no-install-recommends ./${R_INSTALLER} \
Expand All @@ -109,16 +110,26 @@ RUN curl -fsSL -O https://cdn.rstudio.com/r/${DISTRIBUTION}/pkgs/${R_INSTALLER}

# Reference: https://docs.rstudio.com/resources/install-python/

# We are NOT linking one of these Python versions into the PATH.
# This version of python is NOT added to the PATH

RUN curl -O https://cdn.rstudio.com/python/${DISTRIBUTION}/pkgs/python-${PYTHON_VERSION}_1_amd64.deb \
&& apt-get install -yq --no-install-recommends ./python-${PYTHON_VERSION}_1_amd64.deb \
&& rm -rf python-${PYTHON_VERSION}_1_amd64.deb \
&& /opt/python/${PYTHON_VERSION}/bin/python3 -m pip install --upgrade setuptools

# install quarto
# Install Quarto --------------------------------------------------------------#

# Reference: https://docs.posit.co/resources/install-quarto/

# This version of quarto is NOT added to the PATH

ARG QUARTO_VERSION=1.3.340
COPY maybe_install_quarto.sh /tmp/maybe_install_quarto.sh
RUN /opt/R/${R_VERSION}/bin/R -e 'install.packages("odbc", repos="https://packagemanager.rstudio.com/cran/__linux__/bionic/latest")' \
&& /tmp/maybe_install_quarto.sh \
&& rm -f /tmp/maybe_install_quarto.sh

# Add a posit user / group --------------------------------------------------------------#

RUN groupadd -g 999 -r posit && \
useradd -r -u 999 -g 999 -M posit
Loading