diff --git a/workbench-for-microsoft-azure-ml/2026.04/Containerfile.ubuntu2404.min b/workbench-for-microsoft-azure-ml/2026.04/Containerfile.ubuntu2404.min index e221093..48e9493 100644 --- a/workbench-for-microsoft-azure-ml/2026.04/Containerfile.ubuntu2404.min +++ b/workbench-for-microsoft-azure-ml/2026.04/Containerfile.ubuntu2404.min @@ -31,7 +31,12 @@ ENV DIAGNOSTIC_ONLY=false COPY --chmod=0644 workbench-for-microsoft-azure-ml/2026.04/conf/license-manager/TurboActivate.dat /opt/rstudio-license/license-manager.conf -SHELL ["/bin/bash", "-o", "pipefail", "-c"] +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + +### Remove ubuntu user ### +# Ubuntu 24.04 assigns the uid 1000 to the ubuntu user. This is incompatible with the hardcoded PUID=1000 environment +# variable set by Azure ML. By removing the ubuntu user, we can free up the 1000 uid entirely. +RUN userdel -r ubuntu ### Setup environment ### RUN apt-get update -yqq --fix-missing && \ @@ -98,6 +103,8 @@ CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] FROM build AS clamav +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + # Set up ClamAV RUN apt-get update -yqq && \ apt-get install -yqq --no-install-recommends \ diff --git a/workbench-for-microsoft-azure-ml/2026.04/Containerfile.ubuntu2404.std b/workbench-for-microsoft-azure-ml/2026.04/Containerfile.ubuntu2404.std index f457f00..51902a8 100644 --- a/workbench-for-microsoft-azure-ml/2026.04/Containerfile.ubuntu2404.std +++ b/workbench-for-microsoft-azure-ml/2026.04/Containerfile.ubuntu2404.std @@ -31,7 +31,12 @@ ENV DIAGNOSTIC_ONLY=false COPY --chmod=0644 workbench-for-microsoft-azure-ml/2026.04/conf/license-manager/TurboActivate.dat /opt/rstudio-license/license-manager.conf -SHELL ["/bin/bash", "-o", "pipefail", "-c"] +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + +### Remove ubuntu user ### +# Ubuntu 24.04 assigns the uid 1000 to the ubuntu user. This is incompatible with the hardcoded PUID=1000 environment +# variable set by Azure ML. By removing the ubuntu user, we can free up the 1000 uid entirely. +RUN userdel -r ubuntu ### Setup environment ### RUN apt-get update -yqq --fix-missing && \ @@ -151,6 +156,8 @@ CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] FROM build AS clamav +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + # Set up ClamAV RUN apt-get update -yqq && \ apt-get install -yqq --no-install-recommends \ diff --git a/workbench-for-microsoft-azure-ml/2026.04/test/goss.yaml b/workbench-for-microsoft-azure-ml/2026.04/test/goss.yaml index ff253a7..160fe6d 100644 --- a/workbench-for-microsoft-azure-ml/2026.04/test/goss.yaml +++ b/workbench-for-microsoft-azure-ml/2026.04/test/goss.yaml @@ -158,6 +158,14 @@ file: {{ end }} + # Check that Nginx configs are included + /etc/rstudio/nginx.site.conf: + exists: true + /etc/rstudio/nginx.server.conf: + exists: true + /etc/rstudio/nginx.http.conf: + exists: true + command: "Ensure rstudio-server has permissions to log directory": exec: su rstudio-server -c 'touch /var/lib/rstudio-server/monitor/log/rstudio-server.log' diff --git a/workbench-for-microsoft-azure-ml/template/Containerfile.ubuntu2404.jinja2 b/workbench-for-microsoft-azure-ml/template/Containerfile.ubuntu2404.jinja2 index 38826f2..b826221 100644 --- a/workbench-for-microsoft-azure-ml/template/Containerfile.ubuntu2404.jinja2 +++ b/workbench-for-microsoft-azure-ml/template/Containerfile.ubuntu2404.jinja2 @@ -33,7 +33,12 @@ ENV DIAGNOSTIC_ONLY=false COPY --chmod=0644 {{ Path.Version }}/conf/license-manager/TurboActivate.dat /opt/rstudio-license/license-manager.conf -SHELL ["/bin/bash", "-o", "pipefail", "-c"] +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + +### Remove ubuntu user ### +# Ubuntu 24.04 assigns the uid 1000 to the ubuntu user. This is incompatible with the hardcoded PUID=1000 environment +# variable set by Azure ML. By removing the ubuntu user, we can free up the 1000 uid entirely. +RUN userdel -r ubuntu ### Setup environment ### {{ apt.run_setup() }} @@ -132,6 +137,8 @@ CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"] FROM build AS clamav +SHELL ["/bin/bash", "-euo", "pipefail", "-c"] + # Set up ClamAV {{ apt.run_install("clamav") }} diff --git a/workbench-for-microsoft-azure-ml/template/test/goss.yaml.jinja2 b/workbench-for-microsoft-azure-ml/template/test/goss.yaml.jinja2 index ea2a4dc..bfe831a 100644 --- a/workbench-for-microsoft-azure-ml/template/test/goss.yaml.jinja2 +++ b/workbench-for-microsoft-azure-ml/template/test/goss.yaml.jinja2 @@ -170,6 +170,14 @@ file: {{ end }} {% endraw %} + # Check that Nginx configs are included + /etc/rstudio/nginx.site.conf: + exists: true + /etc/rstudio/nginx.server.conf: + exists: true + /etc/rstudio/nginx.http.conf: + exists: true + command: "Ensure rstudio-server has permissions to log directory": exec: su rstudio-server -c 'touch /var/lib/rstudio-server/monitor/log/rstudio-server.log'