From 9dfac5c109c5c600b37b070ff30a839b1f7ab417 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 11:31:33 -0700 Subject: [PATCH 01/15] Force LF line endings via .gitattributes; drop dos2unix Pin eol=lf for files COPY'd into images as Unix scripts (install.R, conf, Rprofile.site, cleanupSessionFiles.sh, rstudio-singleuser) so a fresh checkout is always correct, then remove the now-redundant dos2unix steps (and unused packages) from the affected Dockerfiles. --- .gitattributes | 10 ++++++++++ images/labkey/r/Dockerfile | 2 +- images/labkey/rsandbox-ver/Dockerfile | 5 ++--- images/labkey/rsandbox/Dockerfile | 5 ++--- images/labkey/rstudio-base/Dockerfile | 7 ++----- images/labkey/rstudio-singleuser/Dockerfile | 2 +- images/labkey/rstudio/Dockerfile | 3 +-- 7 files changed, 19 insertions(+), 15 deletions(-) diff --git a/.gitattributes b/.gitattributes index 176a458..fd6c574 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,11 @@ * text=auto + +# These files get COPY'd into Docker images and run/sourced as Unix scripts +# (some Dockerfiles currently run `dos2unix` on them as a workaround). Force +# LF line endings on checkout so a fresh enlistment is always correct, +# regardless of the checkout machine's core.autocrlf setting. +install.R text eol=lf +conf text eol=lf +Rprofile.site text eol=lf +cleanupSessionFiles.sh text eol=lf +rstudio-singleuser text eol=lf diff --git a/images/labkey/r/Dockerfile b/images/labkey/r/Dockerfile index e55fb22..762f3c1 100644 --- a/images/labkey/r/Dockerfile +++ b/images/labkey/r/Dockerfile @@ -4,7 +4,7 @@ FROM ubuntu:${VERSION} RUN apt-get update && \ apt-get install -y --no-install-recommends apt-transport-https apt-utils software-properties-common -RUN apt-get install -y --no-install-recommends build-essential dos2unix libopenblas-dev libssl-dev libxml2-dev nano pandoc procps xvfb x11-common +RUN apt-get install -y --no-install-recommends build-essential libopenblas-dev libssl-dev libxml2-dev nano pandoc procps xvfb x11-common # NOTE much faster to use apt to install prebuilt packages than using "install.packages()" RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ diff --git a/images/labkey/rsandbox-ver/Dockerfile b/images/labkey/rsandbox-ver/Dockerfile index 83941f3..63108b8 100644 --- a/images/labkey/rsandbox-ver/Dockerfile +++ b/images/labkey/rsandbox-ver/Dockerfile @@ -3,7 +3,7 @@ FROM rocker/r-ver:${VERSION} RUN apt-get update && \ apt-get install -y --no-install-recommends apt-utils && \ - apt-get install -y --no-install-recommends dos2unix nano procps libxml2-dev xvfb zlib1g-dev sudo && \ + apt-get install -y --no-install-recommends nano procps libxml2-dev xvfb zlib1g-dev sudo && \ apt-get install -y --no-install-recommends \ curl libcurl4-openssl-dev \ libgd-dev libcairo2 libcairo2-dev libxt-dev pandoc \ @@ -29,8 +29,7 @@ RUN useradd docker \ ## do not use apt-get install r-cran-* to install R packages on this stack ## see rocker/r-ver (see https://hub.docker.com/r/rocker/r-ver/) COPY install.R / -RUN dos2unix install.R && \ - R --no-site-file -f install.R && \ +RUN R --no-site-file -f install.R && \ chmod -R 755 /usr/local/lib/R/site-library CMD ["su", "docker", "-c", "/bin/bash"] \ No newline at end of file diff --git a/images/labkey/rsandbox/Dockerfile b/images/labkey/rsandbox/Dockerfile index 973167b..5aa93f7 100644 --- a/images/labkey/rsandbox/Dockerfile +++ b/images/labkey/rsandbox/Dockerfile @@ -3,7 +3,7 @@ FROM rocker/r-ver:${VERSION} RUN apt-get update && \ apt-get install -y --no-install-recommends apt-transport-https apt-utils software-properties-common && \ - apt-get install -y --no-install-recommends build-essential dos2unix libopenblas-dev libxml2-dev nano pandoc procps xvfb x11-common && \ + apt-get install -y --no-install-recommends build-essential libopenblas-dev libxml2-dev nano pandoc procps xvfb x11-common && \ apt-get install -y --no-install-recommends sudo && \ apt-get install -y --no-install-recommends \ curl libcurl4-openssl-dev \ @@ -29,8 +29,7 @@ RUN useradd docker || true \ COPY install.R / -RUN dos2unix install.R && \ - R --no-site-file -f install.R && \ +RUN R --no-site-file -f install.R && \ chmod -R 755 /usr/local/lib/R/site-library CMD ["su", "docker", "-c", "/bin/bash"] \ No newline at end of file diff --git a/images/labkey/rstudio-base/Dockerfile b/images/labkey/rstudio-base/Dockerfile index e1bea03..47533e2 100644 --- a/images/labkey/rstudio-base/Dockerfile +++ b/images/labkey/rstudio-base/Dockerfile @@ -3,12 +3,11 @@ FROM rocker/rstudio:${VERSION} RUN apt-get update && \ apt-get install -y --no-install-recommends apt-utils && \ - apt-get install -y --no-install-recommends dos2unix nano procps libxml2-dev xvfb zlib1g-dev && \ + apt-get install -y --no-install-recommends nano procps libxml2-dev xvfb zlib1g-dev && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* COPY conf /etc/cont-init.d/ -RUN dos2unix /etc/cont-init.d/conf COPY install.R / RUN R --no-site-file -f install.R && \ @@ -16,11 +15,9 @@ RUN R --no-site-file -f install.R && \ chmod -R 755 /usr/local/lib/R/site-library COPY Rprofile.site /Rprofile.site.tmp -RUN dos2unix /Rprofile.site.tmp && \ - cat /Rprofile.site.tmp >> /usr/local/lib/R/etc/Rprofile.site && \ +RUN cat /Rprofile.site.tmp >> /usr/local/lib/R/etc/Rprofile.site && \ rm /Rprofile.site.tmp RUN echo "R_LIBS_USER=~/R/$(R --version | grep -Eo '[0-9]+[.]+[0-9]+')/library" >> /usr/local/lib/R/etc/Renviron COPY cleanupSessionFiles.sh / -RUN dos2unix /cleanupSessionFiles.sh RUN chmod 755 /cleanupSessionFiles.sh diff --git a/images/labkey/rstudio-singleuser/Dockerfile b/images/labkey/rstudio-singleuser/Dockerfile index e92b27c..d1704ea 100644 --- a/images/labkey/rstudio-singleuser/Dockerfile +++ b/images/labkey/rstudio-singleuser/Dockerfile @@ -2,6 +2,6 @@ ARG VERSION=4.0.5 FROM rocker/rstudio:${VERSION} COPY rstudio-singleuser / -RUN dos2unix /rstudio-singleuser; chmod +x /rstudio-singleuser +RUN chmod +x /rstudio-singleuser CMD /rstudio-singleuser $USER diff --git a/images/labkey/rstudio/Dockerfile b/images/labkey/rstudio/Dockerfile index 4d9bb89..184ac15 100644 --- a/images/labkey/rstudio/Dockerfile +++ b/images/labkey/rstudio/Dockerfile @@ -10,6 +10,5 @@ RUN apt-get update && \ rm -rf /var/lib/apt/lists/* COPY install.R / -RUN dos2unix install.R && \ - R --no-site-file -f install.R && \ +RUN R --no-site-file -f install.R && \ chmod -R 755 /usr/local/lib/R/site-library From 64bbb0e4fce3eb0a2ebb38c0d02db1d7f39cc9d6 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 11:32:16 -0700 Subject: [PATCH 02/15] Re-add .gitignore for .claude/ --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b13ebc3 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.claude/ \ No newline at end of file From 5a4f4907cbb4a3202a895ff75c2542fa8fb8a554 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 11:45:13 -0700 Subject: [PATCH 03/15] Move Dockerfile build inputs into files/ subdirectories Separate files a Dockerfile COPYs into the image from host-side build tooling (make, README) by moving the former into a files/ subdirectory per image and updating COPY paths. Build context is unchanged. --- images/labkey/rsandbox-ver/Dockerfile | 2 +- images/labkey/rsandbox-ver/{ => files}/install.R | 0 images/labkey/rsandbox/Dockerfile | 2 +- images/labkey/rsandbox/{ => files}/install.R | 0 images/labkey/rstudio-base/Dockerfile | 8 ++++---- images/labkey/rstudio-base/{ => files}/Rprofile.site | 0 .../rstudio-base/{ => files}/cleanupSessionFiles.sh | 0 images/labkey/rstudio-base/{ => files}/conf | 0 images/labkey/rstudio-base/{ => files}/install.R | 0 images/labkey/rstudio-singleuser/Dockerfile | 2 +- .../rstudio-singleuser/{ => files}/rstudio-singleuser | 0 images/labkey/rstudio/Dockerfile | 2 +- images/labkey/rstudio/{ => files}/install.R | 0 python/nbconvert/Dockerfile | 6 +++--- python/nbconvert/Dockerfile.echo | 4 ++-- python/nbconvert/{ => files}/ReportConfig.py | 0 python/nbconvert/{ => files}/entrypoint | 0 python/nbconvert/{ => files}/exec_echo | 0 python/nbconvert/{ => files}/exec_runreport_tar | 0 python/nbconvert/{ => files}/execute | 0 python/nbconvert/{ => files}/requirements.txt | 0 21 files changed, 13 insertions(+), 13 deletions(-) rename images/labkey/rsandbox-ver/{ => files}/install.R (100%) rename images/labkey/rsandbox/{ => files}/install.R (100%) rename images/labkey/rstudio-base/{ => files}/Rprofile.site (100%) rename images/labkey/rstudio-base/{ => files}/cleanupSessionFiles.sh (100%) rename images/labkey/rstudio-base/{ => files}/conf (100%) rename images/labkey/rstudio-base/{ => files}/install.R (100%) rename images/labkey/rstudio-singleuser/{ => files}/rstudio-singleuser (100%) rename images/labkey/rstudio/{ => files}/install.R (100%) rename python/nbconvert/{ => files}/ReportConfig.py (100%) rename python/nbconvert/{ => files}/entrypoint (100%) rename python/nbconvert/{ => files}/exec_echo (100%) rename python/nbconvert/{ => files}/exec_runreport_tar (100%) rename python/nbconvert/{ => files}/execute (100%) rename python/nbconvert/{ => files}/requirements.txt (100%) diff --git a/images/labkey/rsandbox-ver/Dockerfile b/images/labkey/rsandbox-ver/Dockerfile index 63108b8..9f8d2c7 100644 --- a/images/labkey/rsandbox-ver/Dockerfile +++ b/images/labkey/rsandbox-ver/Dockerfile @@ -28,7 +28,7 @@ RUN useradd docker \ ## do not use apt-get install r-cran-* to install R packages on this stack ## see rocker/r-ver (see https://hub.docker.com/r/rocker/r-ver/) -COPY install.R / +COPY files/install.R / RUN R --no-site-file -f install.R && \ chmod -R 755 /usr/local/lib/R/site-library diff --git a/images/labkey/rsandbox-ver/install.R b/images/labkey/rsandbox-ver/files/install.R similarity index 100% rename from images/labkey/rsandbox-ver/install.R rename to images/labkey/rsandbox-ver/files/install.R diff --git a/images/labkey/rsandbox/Dockerfile b/images/labkey/rsandbox/Dockerfile index 5aa93f7..6550337 100644 --- a/images/labkey/rsandbox/Dockerfile +++ b/images/labkey/rsandbox/Dockerfile @@ -28,7 +28,7 @@ RUN useradd docker || true \ && chmod -R 775 /home/docker || true -COPY install.R / +COPY files/install.R / RUN R --no-site-file -f install.R && \ chmod -R 755 /usr/local/lib/R/site-library diff --git a/images/labkey/rsandbox/install.R b/images/labkey/rsandbox/files/install.R similarity index 100% rename from images/labkey/rsandbox/install.R rename to images/labkey/rsandbox/files/install.R diff --git a/images/labkey/rstudio-base/Dockerfile b/images/labkey/rstudio-base/Dockerfile index 47533e2..245ad15 100644 --- a/images/labkey/rstudio-base/Dockerfile +++ b/images/labkey/rstudio-base/Dockerfile @@ -7,17 +7,17 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -COPY conf /etc/cont-init.d/ +COPY files/conf /etc/cont-init.d/ -COPY install.R / +COPY files/install.R / RUN R --no-site-file -f install.R && \ chmod -R 755 /usr/local/lib/R/library && \ chmod -R 755 /usr/local/lib/R/site-library -COPY Rprofile.site /Rprofile.site.tmp +COPY files/Rprofile.site /Rprofile.site.tmp RUN cat /Rprofile.site.tmp >> /usr/local/lib/R/etc/Rprofile.site && \ rm /Rprofile.site.tmp RUN echo "R_LIBS_USER=~/R/$(R --version | grep -Eo '[0-9]+[.]+[0-9]+')/library" >> /usr/local/lib/R/etc/Renviron -COPY cleanupSessionFiles.sh / +COPY files/cleanupSessionFiles.sh / RUN chmod 755 /cleanupSessionFiles.sh diff --git a/images/labkey/rstudio-base/Rprofile.site b/images/labkey/rstudio-base/files/Rprofile.site similarity index 100% rename from images/labkey/rstudio-base/Rprofile.site rename to images/labkey/rstudio-base/files/Rprofile.site diff --git a/images/labkey/rstudio-base/cleanupSessionFiles.sh b/images/labkey/rstudio-base/files/cleanupSessionFiles.sh similarity index 100% rename from images/labkey/rstudio-base/cleanupSessionFiles.sh rename to images/labkey/rstudio-base/files/cleanupSessionFiles.sh diff --git a/images/labkey/rstudio-base/conf b/images/labkey/rstudio-base/files/conf similarity index 100% rename from images/labkey/rstudio-base/conf rename to images/labkey/rstudio-base/files/conf diff --git a/images/labkey/rstudio-base/install.R b/images/labkey/rstudio-base/files/install.R similarity index 100% rename from images/labkey/rstudio-base/install.R rename to images/labkey/rstudio-base/files/install.R diff --git a/images/labkey/rstudio-singleuser/Dockerfile b/images/labkey/rstudio-singleuser/Dockerfile index d1704ea..66355c6 100644 --- a/images/labkey/rstudio-singleuser/Dockerfile +++ b/images/labkey/rstudio-singleuser/Dockerfile @@ -1,7 +1,7 @@ ARG VERSION=4.0.5 FROM rocker/rstudio:${VERSION} -COPY rstudio-singleuser / +COPY files/rstudio-singleuser / RUN chmod +x /rstudio-singleuser CMD /rstudio-singleuser $USER diff --git a/images/labkey/rstudio-singleuser/rstudio-singleuser b/images/labkey/rstudio-singleuser/files/rstudio-singleuser similarity index 100% rename from images/labkey/rstudio-singleuser/rstudio-singleuser rename to images/labkey/rstudio-singleuser/files/rstudio-singleuser diff --git a/images/labkey/rstudio/Dockerfile b/images/labkey/rstudio/Dockerfile index 184ac15..5316ad3 100644 --- a/images/labkey/rstudio/Dockerfile +++ b/images/labkey/rstudio/Dockerfile @@ -9,6 +9,6 @@ RUN apt-get update && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* -COPY install.R / +COPY files/install.R / RUN R --no-site-file -f install.R && \ chmod -R 755 /usr/local/lib/R/site-library diff --git a/images/labkey/rstudio/install.R b/images/labkey/rstudio/files/install.R similarity index 100% rename from images/labkey/rstudio/install.R rename to images/labkey/rstudio/files/install.R diff --git a/python/nbconvert/Dockerfile b/python/nbconvert/Dockerfile index e7a3722..4f9de67 100644 --- a/python/nbconvert/Dockerfile +++ b/python/nbconvert/Dockerfile @@ -6,12 +6,12 @@ RUN apt-get install -y jq RUN python3 -m pip install --upgrade pip RUN pip install jupyterlab -COPY requirements.txt /requirements.txt +COPY files/requirements.txt /requirements.txt RUN pip install -r /requirements.txt RUN ln -fs /usr/share/zoneinfo/America/Los_Angeles/etc/localtime && dpkg-reconfigure --frontend noninteractive tzdata -COPY ReportConfig.py / -COPY entrypoint exec_runreport_tar execute / +COPY files/ReportConfig.py / +COPY files/entrypoint files/exec_runreport_tar files/execute / RUN chmod 777 /entrypoint /exec_runreport_tar /execute ENTRYPOINT /entrypoint diff --git a/python/nbconvert/Dockerfile.echo b/python/nbconvert/Dockerfile.echo index db1498a..35eb2f1 100644 --- a/python/nbconvert/Dockerfile.echo +++ b/python/nbconvert/Dockerfile.echo @@ -5,7 +5,7 @@ RUN ln -fs /usr/share/zoneinfo/America/Los_Angeles/etc/localtime && dpkg-reconfi RUN mkdir /reportInput -COPY entrypoint / -COPY exec_echo /execute +COPY files/entrypoint / +COPY files/exec_echo /execute RUN chmod 777 /entrypoint /execute ENTRYPOINT /entrypoint diff --git a/python/nbconvert/ReportConfig.py b/python/nbconvert/files/ReportConfig.py similarity index 100% rename from python/nbconvert/ReportConfig.py rename to python/nbconvert/files/ReportConfig.py diff --git a/python/nbconvert/entrypoint b/python/nbconvert/files/entrypoint similarity index 100% rename from python/nbconvert/entrypoint rename to python/nbconvert/files/entrypoint diff --git a/python/nbconvert/exec_echo b/python/nbconvert/files/exec_echo similarity index 100% rename from python/nbconvert/exec_echo rename to python/nbconvert/files/exec_echo diff --git a/python/nbconvert/exec_runreport_tar b/python/nbconvert/files/exec_runreport_tar similarity index 100% rename from python/nbconvert/exec_runreport_tar rename to python/nbconvert/files/exec_runreport_tar diff --git a/python/nbconvert/execute b/python/nbconvert/files/execute similarity index 100% rename from python/nbconvert/execute rename to python/nbconvert/files/execute diff --git a/python/nbconvert/requirements.txt b/python/nbconvert/files/requirements.txt similarity index 100% rename from python/nbconvert/requirements.txt rename to python/nbconvert/files/requirements.txt From 225fbd28aafe370c26adcb8c968184931d660605 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 11:49:10 -0700 Subject: [PATCH 04/15] Remove unused rstudio-base/init and rstudio-base/rstudio-singleuser Neither file has ever been referenced by any Dockerfile. --- images/labkey/rstudio-base/init | 20 ------------------- images/labkey/rstudio-base/rstudio-singleuser | 2 -- 2 files changed, 22 deletions(-) delete mode 100644 images/labkey/rstudio-base/init delete mode 100644 images/labkey/rstudio-base/rstudio-singleuser diff --git a/images/labkey/rstudio-base/init b/images/labkey/rstudio-base/init deleted file mode 100644 index f1356de..0000000 --- a/images/labkey/rstudio-base/init +++ /dev/null @@ -1,20 +0,0 @@ -#! /bin/bash - -/etc/init.d/rstudio-server start -export RUNNING=1 - -stop_rstudio() -{ - /etc/init.d/rstudio-server stop - [ -e "/home/rstudio/.rstudio/session-persistent-state" ] && rm /home/rstudio/.rstudio/session-persistent-state - export RUNNING=0 -} - -trap stop_rstudio SIGINT SIGTERM - -while [ "$RUNNING" == "1" ] -do - sleep 1 -done - -rm /home/rstudio/.rstudio/session-persistent-state diff --git a/images/labkey/rstudio-base/rstudio-singleuser b/images/labkey/rstudio-base/rstudio-singleuser deleted file mode 100644 index 920f0f5..0000000 --- a/images/labkey/rstudio-base/rstudio-singleuser +++ /dev/null @@ -1,2 +0,0 @@ -cd /home/$USER -su $USER -c "/usr/lib/rstudio-server/bin/rserver --server-daemonize 0 --auth-none 1 --server-working-dir ~ --www-port 8787" From 883825c9d0caa3ece05ae0e15befeb5bf277ca3c Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 12:00:13 -0700 Subject: [PATCH 05/15] Remove rstudio-singleuser and rsandbox-ver images Also drop the now-dead rstudio-singleuser eol=lf rule from .gitattributes. --- .gitattributes | 1 - images/labkey/rsandbox-ver/Dockerfile | 35 ------------------- images/labkey/rsandbox-ver/README.md | 12 ------- images/labkey/rsandbox-ver/files/install.R | 27 -------------- images/labkey/rsandbox-ver/make | 9 ----- images/labkey/rsandbox-ver/make.bat | 1 - images/labkey/rstudio-singleuser/Dockerfile | 7 ---- .../files/rstudio-singleuser | 4 --- images/labkey/rstudio-singleuser/make | 1 - images/labkey/rstudio-singleuser/make.bat | 1 - 10 files changed, 98 deletions(-) delete mode 100644 images/labkey/rsandbox-ver/Dockerfile delete mode 100644 images/labkey/rsandbox-ver/README.md delete mode 100644 images/labkey/rsandbox-ver/files/install.R delete mode 100755 images/labkey/rsandbox-ver/make delete mode 100644 images/labkey/rsandbox-ver/make.bat delete mode 100644 images/labkey/rstudio-singleuser/Dockerfile delete mode 100644 images/labkey/rstudio-singleuser/files/rstudio-singleuser delete mode 100644 images/labkey/rstudio-singleuser/make delete mode 100644 images/labkey/rstudio-singleuser/make.bat diff --git a/.gitattributes b/.gitattributes index fd6c574..f9153b5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -8,4 +8,3 @@ install.R text eol=lf conf text eol=lf Rprofile.site text eol=lf cleanupSessionFiles.sh text eol=lf -rstudio-singleuser text eol=lf diff --git a/images/labkey/rsandbox-ver/Dockerfile b/images/labkey/rsandbox-ver/Dockerfile deleted file mode 100644 index 9f8d2c7..0000000 --- a/images/labkey/rsandbox-ver/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -ARG VERSION=3.6.3 -FROM rocker/r-ver:${VERSION} - -RUN apt-get update && \ - apt-get install -y --no-install-recommends apt-utils && \ - apt-get install -y --no-install-recommends nano procps libxml2-dev xvfb zlib1g-dev sudo && \ - apt-get install -y --no-install-recommends \ - curl libcurl4-openssl-dev \ - libgd-dev libcairo2 libcairo2-dev libxt-dev pandoc \ - libssl-dev openssl && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* - -## Set a default user. Available via runtime flag `--user docker` -## Add user to 'staff' group, granting them write privileges to /usr/local/lib/R/site.library -## User should also have & own a home directory. -RUN useradd docker \ - && mkdir /home/docker \ - && mkdir /home/docker/R_Sandbox \ - && chown -R docker /home/docker \ - && adduser docker staff \ - && adduser docker sudo \ - && echo 'docker ALL=(root) NOPASSWD:ALL' >> /etc/sudoers \ - && echo 'docker ALL=(root) NOPASSWD:ALL' >> /etc/sudoers.d/docker \ - && chmod 0440 /etc/sudoers.d/docker \ - && chmod -R 775 /home/docker - - -## do not use apt-get install r-cran-* to install R packages on this stack -## see rocker/r-ver (see https://hub.docker.com/r/rocker/r-ver/) -COPY files/install.R / -RUN R --no-site-file -f install.R && \ - chmod -R 755 /usr/local/lib/R/site-library - -CMD ["su", "docker", "-c", "/bin/bash"] \ No newline at end of file diff --git a/images/labkey/rsandbox-ver/README.md b/images/labkey/rsandbox-ver/README.md deleted file mode 100644 index 59dd6a6..0000000 --- a/images/labkey/rsandbox-ver/README.md +++ /dev/null @@ -1,12 +0,0 @@ -labkey/rsandbox:r-version -====== - -Dockerfile for building Dockerized LabKey R image using with a specific R version. - -Run `./make` to generate versioned R image `labkey/rsandbox:3.4.2`. - -For any other R version, modify the `VERSION` variable value in `make` file. - -For more information, see: - -https://www.labkey.org/Documentation/wiki-page.view?name=rsandbox diff --git a/images/labkey/rsandbox-ver/files/install.R b/images/labkey/rsandbox-ver/files/install.R deleted file mode 100644 index b8bfc23..0000000 --- a/images/labkey/rsandbox-ver/files/install.R +++ /dev/null @@ -1,27 +0,0 @@ -## -# Copyright (c) 2018 LabKey Corporation -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -## - -install.packages("PKI",repos="http://rforge.net") - -install.packages("Rlabkey", , repos='https://cran.rstudio.com/'); - -install.packages(c("httr", "jsonlite", "Rlabkey", "Cairo", "ggplot2", "plotly", "readr", "data.table", - "highr", - "formatR", - "markdown", - "yaml", - "knitr", - "rmarkdown"), repos='https://cran.rstudio.com/') diff --git a/images/labkey/rsandbox-ver/make b/images/labkey/rsandbox-ver/make deleted file mode 100755 index fade751..0000000 --- a/images/labkey/rsandbox-ver/make +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash - -echo requires docker 17.05.0 or greater - -export VERSION=${1-3.6.3} -shift - -echo creating labkey/rsandbox:${VERSION} -docker build $* --build-arg VERSION=${VERSION} -t labkey/rsandbox:${VERSION} . diff --git a/images/labkey/rsandbox-ver/make.bat b/images/labkey/rsandbox-ver/make.bat deleted file mode 100644 index adceb59..0000000 --- a/images/labkey/rsandbox-ver/make.bat +++ /dev/null @@ -1 +0,0 @@ -docker build --build-arg VERSION=3.4.2 -t labkey/rsandbox:3.4.2 . \ No newline at end of file diff --git a/images/labkey/rstudio-singleuser/Dockerfile b/images/labkey/rstudio-singleuser/Dockerfile deleted file mode 100644 index 66355c6..0000000 --- a/images/labkey/rstudio-singleuser/Dockerfile +++ /dev/null @@ -1,7 +0,0 @@ -ARG VERSION=4.0.5 -FROM rocker/rstudio:${VERSION} - -COPY files/rstudio-singleuser / -RUN chmod +x /rstudio-singleuser - -CMD /rstudio-singleuser $USER diff --git a/images/labkey/rstudio-singleuser/files/rstudio-singleuser b/images/labkey/rstudio-singleuser/files/rstudio-singleuser deleted file mode 100644 index e9ac86a..0000000 --- a/images/labkey/rstudio-singleuser/files/rstudio-singleuser +++ /dev/null @@ -1,4 +0,0 @@ -USER=$1 -USER=${USER:=rstudio} -RSERVER="/usr/lib/rstudio-server/bin/rserver --server-daemonize 0 --auth-none 1 --server-working-dir ~ --www-port 8787" -su -l $USER -c "$RSERVER" diff --git a/images/labkey/rstudio-singleuser/make b/images/labkey/rstudio-singleuser/make deleted file mode 100644 index 583ae77..0000000 --- a/images/labkey/rstudio-singleuser/make +++ /dev/null @@ -1 +0,0 @@ -docker build $* -t labkey/rstudio-singleuser . diff --git a/images/labkey/rstudio-singleuser/make.bat b/images/labkey/rstudio-singleuser/make.bat deleted file mode 100644 index 11f36e8..0000000 --- a/images/labkey/rstudio-singleuser/make.bat +++ /dev/null @@ -1 +0,0 @@ -docker build -t labkey/rstudio-singleuser . From 0c2130295f24ac6fef2f30fbb71c1745b1b4cc8d Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 12:02:55 -0700 Subject: [PATCH 06/15] Generalize .gitattributes eol=lf rule to **/files/** Now that Dockerfile build inputs consistently live under a files/ subdirectory per image, one path pattern covers them instead of an enumerated filename list, so new files added there are covered automatically. --- .gitattributes | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/.gitattributes b/.gitattributes index f9153b5..447746d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,10 +1,7 @@ * text=auto -# These files get COPY'd into Docker images and run/sourced as Unix scripts -# (some Dockerfiles currently run `dos2unix` on them as a workaround). Force -# LF line endings on checkout so a fresh enlistment is always correct, -# regardless of the checkout machine's core.autocrlf setting. -install.R text eol=lf -conf text eol=lf -Rprofile.site text eol=lf -cleanupSessionFiles.sh text eol=lf +# Files under a files/ directory are COPY'd into Docker images and +# run/sourced as Unix scripts. Force LF line endings on checkout so a +# fresh enlistment is always correct, regardless of the checkout +# machine's core.autocrlf setting. +**/files/** text eol=lf From 4d2e03dfb8270d9049a8345e46bc6b458195590a Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 12:14:47 -0700 Subject: [PATCH 07/15] Update versions to 'latest' --- images/labkey/r/Dockerfile | 4 ++-- images/labkey/r/{ => files}/install.R | 0 2 files changed, 2 insertions(+), 2 deletions(-) rename images/labkey/r/{ => files}/install.R (100%) diff --git a/images/labkey/r/Dockerfile b/images/labkey/r/Dockerfile index 762f3c1..edef4af 100644 --- a/images/labkey/r/Dockerfile +++ b/images/labkey/r/Dockerfile @@ -1,4 +1,4 @@ -ARG VERSION=18.04 +ARG VERSION=24.04 FROM ubuntu:${VERSION} RUN apt-get update && \ @@ -30,7 +30,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ r-cran-stringr \ r-cran-tidyr -COPY install.R /tmp/ +COPY files/install.R /tmp/ RUN R --vanilla -f /tmp/install.R RUN ln -fs /usr/share/zoneinfo/America/Los_Angeles/etc/localtime && \ diff --git a/images/labkey/r/install.R b/images/labkey/r/files/install.R similarity index 100% rename from images/labkey/r/install.R rename to images/labkey/r/files/install.R From 0e51cde86d87dcd7f674b8d1a31629bfc17a7120 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 12:19:10 -0700 Subject: [PATCH 08/15] Add validation workflows --- .github/workflows/hadolint.yml | 21 +++++++++++++++++++++ .github/workflows/shellcheck.yml | 16 ++++++++++++++++ .github/workflows/validate_pr.yml | 26 ++++++++++++++++++++++++++ .github/workflows/yamllint.yml | 16 ++++++++++++++++ pull_request_template.md | 8 -------- 5 files changed, 79 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/hadolint.yml create mode 100644 .github/workflows/shellcheck.yml create mode 100644 .github/workflows/validate_pr.yml create mode 100644 .github/workflows/yamllint.yml delete mode 100644 pull_request_template.md diff --git a/.github/workflows/hadolint.yml b/.github/workflows/hadolint.yml new file mode 100644 index 0000000..fd52537 --- /dev/null +++ b/.github/workflows/hadolint.yml @@ -0,0 +1,21 @@ +--- +name: hadolint + +"on": + pull_request: + branches: + - develop + +jobs: + hadolint: + name: hadolint + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v6 + - name: Run hadolint + uses: hadolint/hadolint-action@v3.3.0 + with: + dockerfile: Dockerfile + failure-threshold: 'warning' + ignore: 'DL3008' # Don't worry about pinning versions diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml new file mode 100644 index 0000000..8a383f8 --- /dev/null +++ b/.github/workflows/shellcheck.yml @@ -0,0 +1,16 @@ +--- +name: 'Run Shellcheck' + +"on": + - pull_request + +jobs: + shellcheck: + name: Shellcheck + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v6 + + - name: Run ShellCheck + uses: ludeeus/action-shellcheck@2.0.0 diff --git a/.github/workflows/validate_pr.yml b/.github/workflows/validate_pr.yml new file mode 100644 index 0000000..646e30d --- /dev/null +++ b/.github/workflows/validate_pr.yml @@ -0,0 +1,26 @@ +--- +# Workflow to validate Pull Request branches +name: PR Validation + +# Trigger on PR creation +"on": + pull_request: + types: + - opened + - reopened + - ready_for_review + +jobs: + validate_pr: + if: github.event.pull_request.head.repo.owner.login == 'LabKey' + runs-on: ubuntu-latest + + steps: + - name: Validate PR Branches + uses: LabKey/gitHubActions/validate-pr@develop + with: + pr_base: ${{ github.event.pull_request.base.ref }} + pr_head: ${{ github.event.pull_request.head.ref }} + pr_number: ${{ github.event.pull_request.number }} + pr_title: ${{ github.event.pull_request.title }} + github_token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/yamllint.yml b/.github/workflows/yamllint.yml new file mode 100644 index 0000000..6501a99 --- /dev/null +++ b/.github/workflows/yamllint.yml @@ -0,0 +1,16 @@ +--- +name: 'Yamllint GitHub Actions' + +"on": + - pull_request + +jobs: + yamllint: + name: 'Yamllint' + runs-on: ubuntu-latest + steps: + - name: 'Checkout' + uses: actions/checkout@v6 + + - name: yaml-lint + uses: ibiqlik/action-yamllint@v3 diff --git a/pull_request_template.md b/pull_request_template.md deleted file mode 100644 index 2a1c8ac..0000000 --- a/pull_request_template.md +++ /dev/null @@ -1,8 +0,0 @@ -#### Rationale - - -#### Related Pull Requests -* - -#### Changes -* From 3db22067d7775d302ac528b2c8c882916b7820df Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 12:19:37 -0700 Subject: [PATCH 09/15] Update versions --- images/labkey/rsandbox/Dockerfile | 2 +- images/labkey/rstudio-base/Dockerfile | 2 +- images/labkey/rstudio/Dockerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/images/labkey/rsandbox/Dockerfile b/images/labkey/rsandbox/Dockerfile index 6550337..b3bd8db 100644 --- a/images/labkey/rsandbox/Dockerfile +++ b/images/labkey/rsandbox/Dockerfile @@ -1,4 +1,4 @@ -ARG VERSION=3.6.3 +ARG VERSION=latest FROM rocker/r-ver:${VERSION} RUN apt-get update && \ diff --git a/images/labkey/rstudio-base/Dockerfile b/images/labkey/rstudio-base/Dockerfile index 245ad15..9643896 100644 --- a/images/labkey/rstudio-base/Dockerfile +++ b/images/labkey/rstudio-base/Dockerfile @@ -1,4 +1,4 @@ -ARG VERSION=4.0.5 +ARG VERSION=latest FROM rocker/rstudio:${VERSION} RUN apt-get update && \ diff --git a/images/labkey/rstudio/Dockerfile b/images/labkey/rstudio/Dockerfile index 5316ad3..d28ced7 100644 --- a/images/labkey/rstudio/Dockerfile +++ b/images/labkey/rstudio/Dockerfile @@ -5,7 +5,7 @@ RUN apt-get update && \ apt-get install -y --no-install-recommends \ curl libcurl4-openssl-dev \ libgd-dev libcairo2 libcairo2-dev libxt-dev pandoc \ - libssl-dev openssl && \ + libssl-dev openssl libuv1-dev && \ apt-get clean && \ rm -rf /var/lib/apt/lists/* From 0d0e4b2d72dcf5c14ff47d2a3b058c902f87f526 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 13:17:20 -0700 Subject: [PATCH 10/15] Replace per-image make/make.bat scripts with a single Makefile Add images/labkey/Makefile with a target per R image (r, rsandbox, rstudio-base, rstudio). rsandbox, rstudio-base, and rstudio share a single R_VERSION variable (the R/RStudio version); r's Dockerfile pins its own Ubuntu base version, so it takes no version argument. rstudio depends on rstudio-base like the old scripts' pushd/popd did. Remove the now-redundant make and make.bat scripts and update rsandbox/README.md's build instructions accordingly. --- images/labkey/Makefile | 31 +++++++++++++++++++++++++++++ images/labkey/rsandbox/README.md | 6 +++--- images/labkey/rsandbox/make | 6 ------ images/labkey/rsandbox/make.bat | 1 - images/labkey/rstudio-base/make | 10 ---------- images/labkey/rstudio-base/make.bat | 1 - images/labkey/rstudio/make | 12 ----------- images/labkey/rstudio/make.bat | 4 ---- 8 files changed, 34 insertions(+), 37 deletions(-) create mode 100644 images/labkey/Makefile delete mode 100755 images/labkey/rsandbox/make delete mode 100644 images/labkey/rsandbox/make.bat delete mode 100755 images/labkey/rstudio-base/make delete mode 100644 images/labkey/rstudio-base/make.bat delete mode 100755 images/labkey/rstudio/make delete mode 100644 images/labkey/rstudio/make.bat diff --git a/images/labkey/Makefile b/images/labkey/Makefile new file mode 100644 index 0000000..43e0d88 --- /dev/null +++ b/images/labkey/Makefile @@ -0,0 +1,31 @@ +# Build the LabKey R Docker images. +# +# Usage: +# make [R_VERSION=] +# +# Targets: +# r labkey/r (from ubuntu; version is fixed in the Dockerfile) +# rsandbox labkey/rsandbox (from rocker/r-ver:$(R_VERSION)) +# rstudio-base labkey/rstudio-base (from rocker/rstudio:$(R_VERSION)) +# rstudio labkey/rstudio (from labkey/rstudio-base:$(R_VERSION); builds rstudio-base first) +# all build every image above +# +# Requires Docker 17.05.0 or greater. + +.PHONY: all r rsandbox rstudio-base rstudio + +R_VERSION ?= latest + +all: r rsandbox rstudio-base rstudio + +r: + docker build -t labkey/r:latest r + +rsandbox: + docker build --build-arg VERSION=$(R_VERSION) -t labkey/rsandbox:$(R_VERSION) rsandbox + +rstudio-base: + docker build --build-arg VERSION=$(R_VERSION) -t labkey/rstudio-base:$(R_VERSION) rstudio-base + +rstudio: rstudio-base + docker build --build-arg VERSION=$(R_VERSION) -t labkey/rstudio:$(R_VERSION) rstudio diff --git a/images/labkey/rsandbox/README.md b/images/labkey/rsandbox/README.md index bb23f0f..3cac04e 100644 --- a/images/labkey/rsandbox/README.md +++ b/images/labkey/rsandbox/README.md @@ -3,11 +3,11 @@ labkey/rsandbox:latest Dockerfile for building Dockerized LabKey R image using with the latest R release version. -Run `./make` to generate R image `labkey/rsandbox:latest`. +Run `make rsandbox` from `images/labkey/` to generate R image `labkey/rsandbox:latest`. -Note that actual R version might differ based on latest R version at the time the image is built. +Note that actual R version might differ based on latest R version at the time the image is built. -To tag the image with the actual R version at the time of build, change `latest` in `make` file to the latest R version, for example: `3.5.1`. +To tag the image with the actual R version at the time of build, pass `R_VERSION`, for example: `make rsandbox R_VERSION=4.6.1`. For more information, see: diff --git a/images/labkey/rsandbox/make b/images/labkey/rsandbox/make deleted file mode 100755 index 997c198..0000000 --- a/images/labkey/rsandbox/make +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -echo requires docker 17.05.0 or greater - -echo creating labkey/rsandbox:latest -docker build $* -t labkey/rsandbox:latest . diff --git a/images/labkey/rsandbox/make.bat b/images/labkey/rsandbox/make.bat deleted file mode 100644 index eab1c99..0000000 --- a/images/labkey/rsandbox/make.bat +++ /dev/null @@ -1 +0,0 @@ -docker build -t labkey/rsandbox-base:3.5.1 . \ No newline at end of file diff --git a/images/labkey/rstudio-base/make b/images/labkey/rstudio-base/make deleted file mode 100755 index 5937f40..0000000 --- a/images/labkey/rstudio-base/make +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/bash - -echo requires docker 17.05.0 or greater - -export VERSION=${1-latest} -shift - -echo build using rocker/rstudio:${VERSION} -echo creating labkey/rstudio:${VERSION} -docker build $* --build-arg VERSION=${VERSION} -t labkey/rstudio-base:${VERSION} . diff --git a/images/labkey/rstudio-base/make.bat b/images/labkey/rstudio-base/make.bat deleted file mode 100644 index d156287..0000000 --- a/images/labkey/rstudio-base/make.bat +++ /dev/null @@ -1 +0,0 @@ -docker build -t labkey/rstudio-base . diff --git a/images/labkey/rstudio/make b/images/labkey/rstudio/make deleted file mode 100755 index e4b1131..0000000 --- a/images/labkey/rstudio/make +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -echo requires docker 17.05.0 or greater - -export VERSION=${1-4.0.5} -shift - -echo build VERSION=${VERSION} -pushd ../rstudio-base -./make $VERSION $* -popd -docker build $* --build-arg VERSION=${VERSION} -t labkey/rstudio:$VERSION . diff --git a/images/labkey/rstudio/make.bat b/images/labkey/rstudio/make.bat deleted file mode 100644 index 50d3af8..0000000 --- a/images/labkey/rstudio/make.bat +++ /dev/null @@ -1,4 +0,0 @@ -pushd ..\rstudio-base -CALL .\make.bat %* -popd -docker build -t labkey/rstudio . From 1bf1d2b8bb37f67737c4e0fc17f0a4388f53774e Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 13:25:23 -0700 Subject: [PATCH 11/15] Remove rstudio-base/make_clean Leftover from the pre-Makefile build scripts; superseded by images/labkey/Makefile. --- images/labkey/rstudio-base/make_clean | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 images/labkey/rstudio-base/make_clean diff --git a/images/labkey/rstudio-base/make_clean b/images/labkey/rstudio-base/make_clean deleted file mode 100644 index a360167..0000000 --- a/images/labkey/rstudio-base/make_clean +++ /dev/null @@ -1,2 +0,0 @@ -docker pull rocker/rstudio -docker build --no-cache $* -t labkey/rstudio-base . From e447bd9b6ca2e038fcec8d47204d837a40b451cf Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 13:30:15 -0700 Subject: [PATCH 12/15] Add libuv1-dev --- images/labkey/rsandbox/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/images/labkey/rsandbox/Dockerfile b/images/labkey/rsandbox/Dockerfile index b3bd8db..a774a65 100644 --- a/images/labkey/rsandbox/Dockerfile +++ b/images/labkey/rsandbox/Dockerfile @@ -3,7 +3,7 @@ FROM rocker/r-ver:${VERSION} RUN apt-get update && \ apt-get install -y --no-install-recommends apt-transport-https apt-utils software-properties-common && \ - apt-get install -y --no-install-recommends build-essential libopenblas-dev libxml2-dev nano pandoc procps xvfb x11-common && \ + apt-get install -y --no-install-recommends build-essential libopenblas-dev libxml2-dev nano pandoc procps xvfb x11-common libuv1-dev && \ apt-get install -y --no-install-recommends sudo && \ apt-get install -y --no-install-recommends \ curl libcurl4-openssl-dev \ From 3d2db6ec9e8ff57a2eca4398d956516bd86f3666 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 13:56:05 -0700 Subject: [PATCH 13/15] Make hadolint workflow cover all Dockerfiles The single 'dockerfile: Dockerfile' step only linted a root-level Dockerfile that doesn't exist in this repo. Add recursive: true so it finds every file named Dockerfile anywhere in the tree (recursive mode globs on the literal filename, so it won't catch Dockerfile.echo), and add a second explicit step for python/nbconvert/Dockerfile.echo. --- .github/workflows/hadolint.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/hadolint.yml b/.github/workflows/hadolint.yml index fd52537..e84d855 100644 --- a/.github/workflows/hadolint.yml +++ b/.github/workflows/hadolint.yml @@ -13,9 +13,16 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v6 - - name: Run hadolint + - name: Run hadolint (Dockerfile, recursive) uses: hadolint/hadolint-action@v3.3.0 with: dockerfile: Dockerfile + recursive: true + failure-threshold: 'warning' + ignore: 'DL3008' # Don't worry about pinning versions + - name: Run hadolint (Dockerfile.echo) + uses: hadolint/hadolint-action@v3.3.0 + with: + dockerfile: python/nbconvert/Dockerfile.echo failure-threshold: 'warning' ignore: 'DL3008' # Don't worry about pinning versions From b72b2cd437bf593f02e1a64f26e7cafe255b8880 Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 14:30:21 -0700 Subject: [PATCH 14/15] Fix hadolint findings in r and rstudio-base Dockerfiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit r/Dockerfile: - Consolidate the three apt-get RUN instructions into one (DL3059) and clean up /var/lib/apt/lists afterward (DL3009). - Add --no-install-recommends to the r-cran-* install (DL3015). - Fix 'ln -fs .../America/Los_Angeles/etc/localtime' — a missing space glued the source and destination into one argument, so ln was silently linking into the wrong place (SC2226). rstudio-base/Dockerfile: - Set SHELL with -o pipefail so the piped 'R --version | grep' RUN fails loudly on error instead of masking it (DL4006). --- images/labkey/r/Dockerfile | 17 ++++++++--------- images/labkey/rstudio-base/Dockerfile | 2 ++ 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/images/labkey/r/Dockerfile b/images/labkey/r/Dockerfile index edef4af..394c985 100644 --- a/images/labkey/r/Dockerfile +++ b/images/labkey/r/Dockerfile @@ -2,12 +2,9 @@ ARG VERSION=24.04 FROM ubuntu:${VERSION} RUN apt-get update && \ - apt-get install -y --no-install-recommends apt-transport-https apt-utils software-properties-common - -RUN apt-get install -y --no-install-recommends build-essential libopenblas-dev libssl-dev libxml2-dev nano pandoc procps xvfb x11-common - -# NOTE much faster to use apt to install prebuilt packages than using "install.packages()" -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ + apt-get install -y --no-install-recommends apt-transport-https apt-utils software-properties-common && \ + apt-get install -y --no-install-recommends build-essential libopenblas-dev libssl-dev libxml2-dev nano pandoc procps xvfb x11-common && \ + DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ r-base \ r-cran-bitops \ r-cran-cairo \ @@ -28,12 +25,14 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ r-cran-markdown \ r-cran-scales \ r-cran-stringr \ - r-cran-tidyr + r-cran-tidyr && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* COPY files/install.R /tmp/ -RUN R --vanilla -f /tmp/install.R +RUN R --vanilla -f /tmp/install.R -RUN ln -fs /usr/share/zoneinfo/America/Los_Angeles/etc/localtime && \ +RUN ln -fs /usr/share/zoneinfo/America/Los_Angeles /etc/localtime && \ dpkg-reconfigure --frontend noninteractive tzdata RUN R --version diff --git a/images/labkey/rstudio-base/Dockerfile b/images/labkey/rstudio-base/Dockerfile index 9643896..b53fb59 100644 --- a/images/labkey/rstudio-base/Dockerfile +++ b/images/labkey/rstudio-base/Dockerfile @@ -1,6 +1,8 @@ ARG VERSION=latest FROM rocker/rstudio:${VERSION} +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + RUN apt-get update && \ apt-get install -y --no-install-recommends apt-utils && \ apt-get install -y --no-install-recommends nano procps libxml2-dev xvfb zlib1g-dev && \ From 5164d5cec8225c2a5071fa2c52c1db4a6f0c3acd Mon Sep 17 00:00:00 2001 From: labkey-tchad Date: Fri, 14 Aug 2026 14:31:43 -0700 Subject: [PATCH 15/15] Only hadolint the R images --- .github/workflows/hadolint.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/hadolint.yml b/.github/workflows/hadolint.yml index e84d855..97bc649 100644 --- a/.github/workflows/hadolint.yml +++ b/.github/workflows/hadolint.yml @@ -13,16 +13,10 @@ jobs: steps: - name: Checkout code uses: actions/checkout@v6 - - name: Run hadolint (Dockerfile, recursive) + - name: Run hadolint (R images) uses: hadolint/hadolint-action@v3.3.0 with: - dockerfile: Dockerfile + dockerfile: images/labkey/*/Dockerfile recursive: true failure-threshold: 'warning' ignore: 'DL3008' # Don't worry about pinning versions - - name: Run hadolint (Dockerfile.echo) - uses: hadolint/hadolint-action@v3.3.0 - with: - dockerfile: python/nbconvert/Dockerfile.echo - failure-threshold: 'warning' - ignore: 'DL3008' # Don't worry about pinning versions