UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Ironbank Containers
A
aiml
r
rstudio
Commits
400cc297
Commit
400cc297
authored
May 25, 2021
by
Rob McCarthy
Browse files
change HEALTHCHECK
parent
100834b0
Pipeline
#277696
passed with stages
in 7 minutes and 34 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
57 deletions
+35
-57
Dockerfile
Dockerfile
+35
-57
No files found.
Dockerfile
View file @
400cc297
ARG
BASE_REGISTRY=registry1.dso
p.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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment