@@ -6,16 +6,6 @@ USER root
66# This must be in the Dockerfile because it references a build context (load-envs).
77COPY --from=load-envs /dist/load-env /dist/load-env.sh /opt/sas/aou/
88
9- # ##############################################################################
10- # Package-manager compatibility
11- # Workbench startup scripts (post-startup.sh, resource-mount.sh) expect
12- # apt-get / apt. These shims delegate to yum on this RHEL-based SAS image.
13- # ##############################################################################
14- RUN printf '#!/bin/bash\n case "$1" in\n update) exec yum makecache -y ;;\n install) shift; exec yum install -y --allowerasing "$@" ;;\n *) exec yum "$@" ;;\n esac\n ' > /usr/local/bin/apt-get && \
15- chmod +x /usr/local/bin/apt-get && \
16- cp /usr/local/bin/apt-get /usr/local/bin/apt && \
17- chmod +x /usr/local/bin/apt
18-
199# ##############################################################################
2010# Disable SAS-internal repos (unreachable outside SAS network) and enable
2111# public UBI + EPEL repos so packages like jq, fuse, git can be resolved.
@@ -26,22 +16,14 @@ RUN dnf config-manager --set-disabled \
2616 sas-ubi-9-baseos sas-ubi-9-appstream sas-ubi-9-codeready-builder && \
2717 dnf config-manager --set-enabled \
2818 ubi-9-baseos-rpms ubi-9-appstream-rpms ubi-9-codeready-builder-rpms && \
29- rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm && \
30- yum clean all
19+ dnf clean all
3120
3221# ##############################################################################
3322# System packages required by Workbench startup scripts
3423# ##############################################################################
35- RUN yum install -y --allowerasing curl fuse fuse-libs wget sudo git \
24+ RUN dnf install -y --allowerasing curl fuse fuse-libs wget sudo git \
3625 java-17-openjdk-headless && \
37- yum clean all
38-
39- # ##############################################################################
40- # gcsfuse — GCS bucket mounting
41- # ##############################################################################
42- RUN printf '[gcsfuse]\n name=gcsfuse (packages.cloud.google.com)\n baseurl=https://packages.cloud.google.com/yum/repos/gcsfuse-el7-x86_64\n enabled=1\n gpgcheck=1\n repo_gpgcheck=0\n gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg\n https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg\n ' > /etc/yum.repos.d/gcsfuse.repo && \
43- yum install -y gcsfuse && \
44- yum clean all
26+ dnf clean all
4527
4628# ##############################################################################
4729# Google Cloud SDK
@@ -66,6 +48,10 @@ RUN groupadd -g 1100 aougroup && \
6648# ##############################################################################
6749RUN echo "-work /data/saswork" >> /opt/sas/viya/config/etc/workspaceserver/default/sasv9_usermods.cfg && \
6850 echo "-utilloc /data/utilloc" >> /opt/sas/viya/config/etc/workspaceserver/default/sasv9_usermods.cfg && \
51+ echo 'if [ -f /data/.aou-env ]; then source /data/.aou-env; fi' >> \
52+ /opt/sas/viya/config/etc/workspaceserver/default/workspaceserver_usermods.sh && \
53+ echo 'if [ -f /data/.workbench-env ]; then source /data/.workbench-env; fi' >> \
54+ /opt/sas/viya/config/etc/workspaceserver/default/workspaceserver_usermods.sh && \
6955 sed -Ei 's#^USERMODS=(.*)#USERMODS=-allowxcmd \1 #g' \
7056 /opt/sas/viya/config/etc/spawner/default/spawner_usermods.sh
7157
@@ -87,6 +73,11 @@ RUN PROXY_CONF=/etc/httpd/conf.d/dkrapro-proxy.conf && \
8773 sed -i '/AOU-CONFIGURED/a Header unset Content-Security-Policy' "${PROXY_CONF}" && \
8874 sed -i '/AOU-CONFIGURED/a Header edit Set-Cookie "^(.*SameSite=None.*)\$ " "\$ 1; Secure"' "${PROXY_CONF}"
8975
76+ # ##############################################################################
77+ # Create /data directory and chown to AoU user
78+ # ##############################################################################
79+ RUN mkdir -p /data && chown aou:aougroup /data
80+
9081# Wrapper entrypoint: copies the SAS license from Mikey Secrets (if active)
9182# to /sasinside/ before handing off to the SAS entrypoint.
9283COPY --from=wb-secret-receiver /dist/wb-secret-receiver /wb-secret-receiver
0 commit comments