Skip to content
Draft
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
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
* text=auto

# 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
3 changes: 3 additions & 0 deletions .github/workflows/hadolint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ name: hadolint
branches:
- develop

permissions:
contents: read

jobs:
hadolint:
name: hadolint
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/shellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: 'Run Shellcheck'

"on":
- pull_request

permissions:
contents: read

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
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
3 changes: 3 additions & 0 deletions .github/workflows/validate_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ name: PR Validation
- reopened
- ready_for_review

permissions:
contents: read

jobs:
validate_pr:
if: github.event.pull_request.head.repo.owner.login == 'LabKey'
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/yamllint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ name: 'Yamllint GitHub Actions'
"on":
- pull_request

permissions:
contents: read

jobs:
yamllint:
name: 'Yamllint'
Expand Down
31 changes: 31 additions & 0 deletions images/labkey/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Build the LabKey R Docker images.
#
# Usage:
# make <target> [R_VERSION=<tag>]
#
# 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
6 changes: 3 additions & 3 deletions images/labkey/r/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG VERSION=18.04
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 && \
apt-get install -y --no-install-recommends build-essential dos2unix libopenblas-dev libssl-dev libxml2-dev nano pandoc procps xvfb x11-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 \
Expand All @@ -29,7 +29,7 @@ RUN apt-get update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

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 && \
Expand Down
File renamed without changes.
36 changes: 0 additions & 36 deletions images/labkey/rsandbox-ver/Dockerfile

This file was deleted.

12 changes: 0 additions & 12 deletions images/labkey/rsandbox-ver/README.md

This file was deleted.

27 changes: 0 additions & 27 deletions images/labkey/rsandbox-ver/install.R

This file was deleted.

9 changes: 0 additions & 9 deletions images/labkey/rsandbox-ver/make

This file was deleted.

1 change: 0 additions & 1 deletion images/labkey/rsandbox-ver/make.bat

This file was deleted.

9 changes: 4 additions & 5 deletions images/labkey/rsandbox/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
ARG VERSION=3.6.3
ARG VERSION=latest
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 libuv1-dev && \
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 \
Expand All @@ -28,9 +28,8 @@ RUN useradd docker || true \
&& chmod -R 775 /home/docker || true


COPY install.R /
RUN dos2unix install.R && \
R --no-site-file -f install.R && \
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"]
6 changes: 3 additions & 3 deletions images/labkey/rsandbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
6 changes: 0 additions & 6 deletions images/labkey/rsandbox/make

This file was deleted.

1 change: 0 additions & 1 deletion images/labkey/rsandbox/make.bat

This file was deleted.

19 changes: 8 additions & 11 deletions images/labkey/rstudio-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,28 +1,25 @@
ARG VERSION=4.0.5
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 dos2unix nano procps libxml2-dev xvfb zlib1g-dev libuv1-dev && \
apt-get install -y --no-install-recommends nano procps libxml2-dev xvfb zlib1g-dev libuv1-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

COPY conf /etc/cont-init.d/
RUN dos2unix /etc/cont-init.d/conf
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
RUN dos2unix /Rprofile.site.tmp && \
cat /Rprofile.site.tmp >> /usr/local/lib/R/etc/Rprofile.site && \
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 /
RUN dos2unix /cleanupSessionFiles.sh && \
chmod 755 /cleanupSessionFiles.sh
COPY files/cleanupSessionFiles.sh /
RUN chmod 755 /cleanupSessionFiles.sh
File renamed without changes.
20 changes: 0 additions & 20 deletions images/labkey/rstudio-base/init

This file was deleted.

10 changes: 0 additions & 10 deletions images/labkey/rstudio-base/make

This file was deleted.

1 change: 0 additions & 1 deletion images/labkey/rstudio-base/make.bat

This file was deleted.

2 changes: 0 additions & 2 deletions images/labkey/rstudio-base/make_clean

This file was deleted.

2 changes: 0 additions & 2 deletions images/labkey/rstudio-base/rstudio-singleuser

This file was deleted.

7 changes: 0 additions & 7 deletions images/labkey/rstudio-singleuser/Dockerfile

This file was deleted.

1 change: 0 additions & 1 deletion images/labkey/rstudio-singleuser/make

This file was deleted.

1 change: 0 additions & 1 deletion images/labkey/rstudio-singleuser/make.bat

This file was deleted.

4 changes: 0 additions & 4 deletions images/labkey/rstudio-singleuser/rstudio-singleuser

This file was deleted.

5 changes: 2 additions & 3 deletions images/labkey/rstudio/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ RUN apt-get update && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

COPY install.R /
RUN dos2unix install.R && \
R --no-site-file -f install.R && \
COPY files/install.R /
RUN R --no-site-file -f install.R && \
chmod -R 755 /usr/local/lib/R/site-library
File renamed without changes.
12 changes: 0 additions & 12 deletions images/labkey/rstudio/make

This file was deleted.

4 changes: 0 additions & 4 deletions images/labkey/rstudio/make.bat

This file was deleted.

8 changes: 0 additions & 8 deletions pull_request_template.md

This file was deleted.

6 changes: 3 additions & 3 deletions python/nbconvert/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading