From 4b7ab434d8f236d16015ed58fe6733edd8da97e5 Mon Sep 17 00:00:00 2001 From: Tasko Olevski Date: Fri, 22 Nov 2024 15:48:13 +0100 Subject: [PATCH] fix: linting --- docker/vscode/R.Dockerfile | 11 ++++++----- docker/vscode/base.Dockerfile | 3 ++- docker/vscode/conda.Dockerfile | 3 ++- docker/vscode/poetry.Dockerfile | 3 ++- 4 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docker/vscode/R.Dockerfile b/docker/vscode/R.Dockerfile index 022b9c80..4c011471 100644 --- a/docker/vscode/R.Dockerfile +++ b/docker/vscode/R.Dockerfile @@ -4,15 +4,16 @@ ARG R_VERSION=4.4.2 ARG SESSION_USER=vscode ARG WORKDIR=/home/${SESSION_USER}/work +SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] USER root # From https://docs.posit.co/resources/install-r.html RUN curl -O https://cdn.rstudio.com/r/debian-12/pkgs/r-${R_VERSION}_1_amd64.deb \ && apt-get update \ - && apt-get install -y ./r-${R_VERSION}_1_amd64.deb \ + && apt-get install -y --no-install-recommends ./r-${R_VERSION}_1_amd64.deb \ && rm -rf /var/lib/apt/lists/* \ && rm -rf ./r-${R_VERSION}_1_amd64.deb \ - && sudo ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R \ - && sudo ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript + && ln -s /opt/R/${R_VERSION}/bin/R /usr/local/bin/R \ + && ln -s /opt/R/${R_VERSION}/bin/Rscript /usr/local/bin/Rscript USER ${SESSION_USER} WORKDIR ${WORKDIR} @@ -21,5 +22,5 @@ WORKDIR ${WORKDIR} # The .Rprofile changes allow R to be able to use precompiled packages # See https://packagemanager.posit.co/client/#/repos/cran/setup RUN mkdir -p ${WORKDIR}/.rlibs \ - && echo "\nR_LIBS_SITE=\"${WORKDIR}/.rlibs\"\n" >> /home/${SESSION_USER}/.Renviron \ - && echo "\noptions(repos = c(CRAN = \"https://packagemanager.posit.co/cran/__linux__/bookworm/latest\"))\n" >> /home/${SESSION_USER}/.Rprofile + && printf "\nR_LIBS_SITE=\"%s/.rlibs\"\n" "${WORKDIR}" >> /home/${SESSION_USER}/.Renviron \ + && printf "\noptions(repos = c(CRAN = \"https://packagemanager.posit.co/cran/__linux__/bookworm/latest\"))\n" >> /home/${SESSION_USER}/.Rprofile diff --git a/docker/vscode/base.Dockerfile b/docker/vscode/base.Dockerfile index fcc82b1c..498d5ef8 100644 --- a/docker/vscode/base.Dockerfile +++ b/docker/vscode/base.Dockerfile @@ -2,8 +2,9 @@ ARG BASE_IMAGE=mcr.microsoft.com/devcontainers/base:bookworm FROM $BASE_IMAGE ARG VSCODIUM_VERSION=1.95.2.24313 ARG SESSION_USER=vscode +SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] RUN apt-get update && \ - apt-get install -y curl tini git-lfs && \ + apt-get install -y --no-install-recommends curl tini git-lfs && \ mkdir -p /codium-server && \ curl -L https://github.com/VSCodium/vscodium/releases/download/${VSCODIUM_VERSION}/vscodium-reh-web-linux-x64-${VSCODIUM_VERSION}.tar.gz | tar -xz -C /codium-server && \ rm -rf /var/lib/apt/lists/* diff --git a/docker/vscode/conda.Dockerfile b/docker/vscode/conda.Dockerfile index 6acd188a..00dd6dee 100644 --- a/docker/vscode/conda.Dockerfile +++ b/docker/vscode/conda.Dockerfile @@ -7,9 +7,10 @@ ARG SESSION_USER=vscode ARG WORKDIR=/home/${SESSION_USER}/work ARG VENVS_PATH=${WORKDIR}/.venvs ENV VENVS_PATH=${VENVS_PATH} +SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] USER root RUN apt-get update && \ - apt-get install -y curl && \ + apt-get install -y curl --no-install-recommends && \ curl -L "https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-${OS}-${ARCH}.sh" -o install.sh && \ rm -rf /var/lib/apt/lists/* diff --git a/docker/vscode/poetry.Dockerfile b/docker/vscode/poetry.Dockerfile index 30cc7476..d673907e 100644 --- a/docker/vscode/poetry.Dockerfile +++ b/docker/vscode/poetry.Dockerfile @@ -7,9 +7,10 @@ ARG POETRY_VERSION="" ARG SESSION_USER=vscode ARG WORKDIR=/home/${SESSION_USER}/work ARG VENVS_PATH=${WORKDIR}/.venvs +SHELL [ "/bin/bash", "-c", "-o", "pipefail" ] USER root RUN apt-get update && \ - apt-get install -y curl libz-dev libreadline-dev libncurses-dev libsqlite3-dev libssl-dev liblzma-dev libgdbm-dev libbz2-dev libffi-dev && \ + apt-get install -y --no-install-recommends curl libz-dev libreadline-dev libncurses-dev libsqlite3-dev libssl-dev liblzma-dev libgdbm-dev libbz2-dev libffi-dev && \ mkdir -p /python-build && \ curl -L https://github.com/pyenv/pyenv/archive/refs/tags/${PYENV_VERSION}.tar.gz | tar -xz -C /python-build && \ /bin/sh /python-build/*/plugins/python-build/install.sh && \