diff --git a/Dockerfile b/Dockerfile index dac4adc..d952fc9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -136,42 +136,43 @@ RUN chmod +x /tmp/install_latex.sh &&\ && tlmgr option -- srcfiles 0 \ && tlmgr install \ $(grep -o '^[^#]*' /tmp/latex_packages.txt | tr '\n' ' ') \ - && chown --recursive $USERNAME:$USERNAME /usr/local/texlive \ - && cargo install tex-fmt + && chown --recursive $USERNAME:$USERNAME /usr/local/texlive # Set Latex Paths ENV PATH="/usr/local/texlive/bin/x86_64-linux:${PATH}" -ENV PATH="/root/.cargo/bin:${PATH}" # Install R ENV R_VERSION=4.4.1 # Set RSPM snapshot see: -# 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__/noble/2024-10-01 - -COPY install_scripts/install_r.sh /tmp/install_r.sh -COPY package_lists/r_packages.txt /tmp/r_packages.txt -COPY package_lists/r_packages_github.txt /tmp/r_packages_github.txt - -RUN chmod +x /tmp/install_r.sh &&\ + # 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__/noble/2024-10-01 + + COPY install_scripts/install_r.sh /tmp/install_r.sh + COPY package_lists/r_packages.txt /tmp/r_packages.txt + COPY package_lists/r_packages_github.txt /tmp/r_packages_github.txt + + RUN chmod +x /tmp/install_r.sh &&\ /tmp/install_r.sh - -COPY --chown=$USERNAME .misc/.zshrc /home/$USERNAME/. - -COPY --chown=$USERNAME .misc/.Rprofile /home/$USERNAME/. - -RUN mkdir /home/$USERNAME/.R && chown -R $USERNAME /home/$USERNAME/.R -COPY --chown=$USERNAME .misc/Makevars /home/$USERNAME/.R/. - -RUN mkdir /home/$USERNAME/.ccache && chown -R $USERNAME /home/$USERNAME/.ccache -COPY --chown=$USERNAME .misc/ccache.conf /home/$USERNAME/.ccache/. - -RUN chown -R $USERNAME /usr/local/lib -RUN chown -R $USERNAME /usr/local/include - -# Switch to non-root user -USER $USERNAME - + + COPY --chown=$USERNAME .misc/.zshrc /home/$USERNAME/. + + COPY --chown=$USERNAME .misc/.Rprofile /home/$USERNAME/. + + RUN mkdir /home/$USERNAME/.R && chown -R $USERNAME /home/$USERNAME/.R + COPY --chown=$USERNAME .misc/Makevars /home/$USERNAME/.R/. + + RUN mkdir /home/$USERNAME/.ccache && chown -R $USERNAME /home/$USERNAME/.ccache + COPY --chown=$USERNAME .misc/ccache.conf /home/$USERNAME/.ccache/. + + RUN chown -R $USERNAME /usr/local/lib + RUN chown -R $USERNAME /usr/local/include + + # Switch to non-root user + USER $USERNAME + + RUN cargo install tex-fmt + ENV PATH="/home/${USERNAME}/.cargo/bin:${PATH}" + # Start zsh CMD [ "zsh" ] \ No newline at end of file