UNCLASSIFIED

Commit 400cc297 authored by Rob McCarthy's avatar Rob McCarthy
Browse files

change HEALTHCHECK

parent 100834b0
Pipeline #277696 passed with stages
in 7 minutes and 34 seconds
ARG BASE_REGISTRY=registry1.dsop.io
ARG BASE_REGISTRY=registry1.dso.mil
ARG BASE_IMAGE=ironbank/opensource/r/r-base
ARG BASE_TAG=latest
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
ARG BASE_TAG=4.0.3
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
USER root
RUN dnf update -y && \
dnf clean all -y && \
dnf install -y initscripts
# R Studio Installation
# https://rstudio.com/products/rstudio/download-server/redhat-centos/
WORKDIR /tmp/repo
RUN dnf install -y \
net-tools \
curl \
git
# Download R Studio rpm
# curl -LO https://download2.rstudio.org/server/centos8/x86_64/rstudio-server-rhel-1.4.1106-x86_64.rpm
COPY rstudio-server-rhel-1.4.1106-x86_64.rpm .
COPY config/rstudio-signing.key /
RUN rpm --import /rstudio-signing.key
# Install R Studio
RUN dnf localinstall -y rstudio-server-rhel-1.4.1106-x86_64.rpm
# Verify Installation and write log
#RUN rstudio-server verify-installation >> /tmp/rstudio-server.log
# Fixes permissions issue with sqlite3
RUN chown -R root:root /var/lib/rstudio-server && \
chmod -R g=u /var/lib/rstudio-server
#Disable RStudio Authentication
RUN cp /etc/rstudio/rserver.conf /etc/rstudio/disable_auth_rserver.conf
RUN echo "auth-none=1" >> /etc/rstudio/disable_auth_rserver.conf
# If authentication is re-enabled, the free version of rstudio requires authentication using local linux credentials
# the following creates an account with credentials to logon into rstudio
#RUN useradd rstudio && \
# echo "rstudio:rstudio" | chpasswd
RUN mkdir /home/rstudio-server && \
chown rstudio-server:rstudio-server /home/rstudio-server
# Cleanup
RUN rm -rf /tmp/repo
# config user environment and healthcheck
ENV RSTUDIO_VERSION=1.4.1106
COPY rstudio-server-rhel-${RSTUDIO_VERSION}-x86_64.rpm /tmp
RUN dnf upgrade -y && \
dnf install -y --nogpgcheck glibc-langpack-en initscripts procps-ng /tmp/rstudio-server-rhel-${RSTUDIO_VERSION}-x86_64.rpm \
binutils curl glibc-devel glibc-headers libcurl-devel libX11 libX11-common kernel-headers && \
mkdir -p /local/libs && \
chown -R $USER /var/lib/rstudio-server /var/run/rstudio-server && \
chmod -R g=u /var/lib/rstudio-server && \
chmod -R g=u /etc/rstudio && \
ln -s /usr/lib/rstudio-server/bin/rstudio-server /usr/local/bin/rstudio-server && \
chmod +t /var/run/rstudio-server && \
chkconfig rstudio-server off
RUN R -e "library(tools); write_PACKAGES('/local/libs')" && \
cat /tmp/rpackages | awk '{printf "\x27"$1"\x27,"}' | sed 's/.$//' | xargs -0 -I {} R -e "install.packages(c({}), contriburl='file:///local/libs')" && \
rpm -e --nodeps binutils curl glibc-devel glibc-headers libcurl-devel libX11 libX11-common kernel-headers && \
echo "auth-none=1" >> /etc/rstudio/disable_auth_rserver.conf && \
echo "server-daemonize=0" >> /etc/rstudio/rserver.conf && \
echo "[*]" > /etc/rstudio/logging.conf && \
echo "log-level=warn" >> /etc/rstudio/logging.conf && \
echo "logger-type=stderr" >> /etc/rstudio/logging.conf && \
dnf clean all && \
rm -rf /var/cache/dnf /tmp/* /local/libs/*
ENV LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8
USER ${USER}
EXPOSE 8787
USER default
WORKDIR $HOME
ENTRYPOINT [ "rstudio-server", "start" ]
ENTRYPOINT ["rstudio-server", "start"]
HEALTHCHECK CMD pgrep "rserver" > /dev/null || exit 1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment