Skip to content

Commit

Permalink
Use Ubuntu 24.04 (WIP)
Browse files Browse the repository at this point in the history
  • Loading branch information
BerriJ committed Oct 2, 2024
1 parent 2febd4c commit 80a8a80
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
19 changes: 11 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM ubuntu:jammy@sha256:58b87898e82351c6cf9cf5b9f3c20257bb9e2dcf33af051e12ce532d7f94e3fe
FROM ubuntu:noble@sha256:b359f1067efa76f37863778f7b6d0e8d911e3ee8efa807ad01fbf5dc1ef9006b


SHELL ["/bin/bash", "-c"]

Expand All @@ -10,10 +11,12 @@ ARG USER_UID=1000
ARG USER_GID=$USER_UID
ARG DEBIAN_FRONTEND=noninteractive

# Add non root user
RUN groupadd --gid $USER_GID $USERNAME \
&& useradd -rm -d /home/$USERNAME -s /bin/bash -g root --uid $USER_UID --gid $USER_GID $USERNAME \
&& addgroup $USERNAME staff
# Rename ubuntu user to $USERNAME
RUN usermod -l $USERNAME ubuntu \
# Add new group called $USERNAME
&& groupadd $USERNAME \
# Add new user $USERNAME to the groups $USERNAME and staff
&& usermod -a -G staff,$USERNAME $USERNAME

# Create folders to mount extensions
RUN mkdir -p /home/$USERNAME/.vscode-server/extensions \
Expand Down Expand Up @@ -116,7 +119,7 @@ RUN apt-get update &&\
python3-dev \
python3-venv && \
# Python packages
pip3 install -U --no-cache-dir \
pip3 install -U --no-cache-dir --break-system-packages \
$(grep -o '^[^#]*' package_lists/python_packages.txt | tr '\n' ' ') \
&& apt-get autoclean -y \
&& rm -rf /var/lib/apt/lists/*
Expand Down Expand Up @@ -145,8 +148,8 @@ ENV PATH="/usr/local/texlive/bin/x86_64-linux:${PATH}"
ENV R_VERSION=4.4.1

# Set RSPM snapshot see:
# https://packagemanager.posit.co/client/#/repos/cran/setup?r_environment=other&snapshot=2023-10-04&distribution=ubuntu-22.04
ENV R_REPOS=https://packagemanager.posit.co/cran/__linux__/jammy/2024-09-18
# https://packagemanager.posit.co/client/#/repos/cran/setup?r_environment=other&snapshot=2024-10-01&distribution=ubuntu-22.04
ENV R_REPOS=https://packagemanager.posit.co/cran/__linux__/jammy/2024-10-01

COPY install_scripts/install_r.sh /tmp/install_r.sh
COPY package_lists/r_packages.txt /tmp/r_packages.txt
Expand Down
6 changes: 2 additions & 4 deletions install_scripts/install_r.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
#!/bin/bash

echo "deb http://cloud.r-project.org/bin/linux/ubuntu jammy-cran40/" >> /etc/apt/sources.list
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
gpg -a --export E298A3A825C0D65DFD57CBB651716619E084DAB9 | apt-key add -
apt-get update
echo "deb http://cloud.r-project.org/bin/linux/ubuntu noble-cran40/" >> /etc/apt/sources.list
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc

apt-get update

Expand Down

0 comments on commit 80a8a80

Please sign in to comment.