FROM registry.access.redhat.com/ubi9/ubi:9.1.0-1782 ENV HOME /home/user USER 0 RUN dnf install -y diffutils git iproute jq less lsof man nano procps \ perl-Digest-SHA net-tools openssh-clients rsync socat sudo time vim wget zip && \ dnf update -y && \ dnf clean all RUN \ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash && \ export NVM_DIR="$HOME/.nvm" && \ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" && \ nvm install 16.20.0 ENV VSCODE_NODEJS_RUNTIME_DIR="$HOME/.nvm/versions/node/v16.20.0/bin/" RUN \ # add user and configure it useradd -u 10001 -G wheel,root -d /home/user --shell /bin/bash -m user && \ # Setup $PS1 for a consistent and reasonable prompt echo "export PS1='\W \`git branch --show-current 2>/dev/null | sed -r -e \"s@^(.+)@\(\1\) @\"\`$ '" >> /home/user/.bashrc && \ # Set permissions on /etc/passwd and /home to allow arbitrary users to write chgrp -R 0 /home && \ chmod -R g=u /etc/passwd /etc/group /home # Install .NET # .NET ENV DOTNET_RPM_VERSION=7.0 RUN dnf install -y dotnet-hostfxr-${DOTNET_RPM_VERSION} dotnet-runtime-${DOTNET_RPM_VERSION} dotnet-sdk-${DOTNET_RPM_VERSION} USER 10001 WORKDIR /projects