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_IMAGE=ironbank/opensource/r/r-base
ARG BASE_TAG=latest ARG BASE_TAG=4.0.3
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
USER root USER root
RUN dnf update -y && \ ENV RSTUDIO_VERSION=1.4.1106
dnf clean all -y && \
dnf install -y initscripts COPY rstudio-server-rhel-${RSTUDIO_VERSION}-x86_64.rpm /tmp
# R Studio Installation RUN dnf upgrade -y && \
# https://rstudio.com/products/rstudio/download-server/redhat-centos/ 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 && \
WORKDIR /tmp/repo mkdir -p /local/libs && \
chown -R $USER /var/lib/rstudio-server /var/run/rstudio-server && \
RUN dnf install -y \ chmod -R g=u /var/lib/rstudio-server && \
net-tools \ chmod -R g=u /etc/rstudio && \
curl \ ln -s /usr/lib/rstudio-server/bin/rstudio-server /usr/local/bin/rstudio-server && \
git chmod +t /var/run/rstudio-server && \
chkconfig rstudio-server off
# Download R Studio rpm
# curl -LO https://download2.rstudio.org/server/centos8/x86_64/rstudio-server-rhel-1.4.1106-x86_64.rpm RUN R -e "library(tools); write_PACKAGES('/local/libs')" && \
COPY rstudio-server-rhel-1.4.1106-x86_64.rpm . 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 && \
COPY config/rstudio-signing.key / echo "server-daemonize=0" >> /etc/rstudio/rserver.conf && \
RUN rpm --import /rstudio-signing.key echo "[*]" > /etc/rstudio/logging.conf && \
# Install R Studio echo "log-level=warn" >> /etc/rstudio/logging.conf && \
RUN dnf localinstall -y rstudio-server-rhel-1.4.1106-x86_64.rpm echo "logger-type=stderr" >> /etc/rstudio/logging.conf && \
dnf clean all && \
# Verify Installation and write log rm -rf /var/cache/dnf /tmp/* /local/libs/*
#RUN rstudio-server verify-installation >> /tmp/rstudio-server.log
ENV LC_ALL=en_US.UTF-8 \
# Fixes permissions issue with sqlite3 LANG=en_US.UTF-8 \
RUN chown -R root:root /var/lib/rstudio-server && \ LANGUAGE=en_US.UTF-8
chmod -R g=u /var/lib/rstudio-server
USER ${USER}
#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
EXPOSE 8787 EXPOSE 8787
USER default ENTRYPOINT ["rstudio-server", "start"]
WORKDIR $HOME
ENTRYPOINT [ "rstudio-server", "start" ]
HEALTHCHECK CMD pgrep "rserver" > /dev/null || exit 1 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