-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
64 lines (52 loc) · 2.23 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#
# Rock R Server Dockerfile
#
# https://github.com/obiba/docker-rock
#
FROM obiba/obiba-r:4.4.2 AS server
LABEL OBiBa <dev@obiba.org>
ENV ROCK_VERSION 2.1.2
ENV ROCK_HOME /srv
ENV JAVA_OPTS -Xmx2G
WORKDIR /tmp
# Install Rock Server
RUN set -x && \
cd /usr/share/ && \
wget -q -O rock.zip https://github.com/obiba/rock/releases/download/${ROCK_VERSION}/rock-${ROCK_VERSION}-dist.zip && \
unzip -q rock.zip && \
rm rock.zip && \
mv rock-${ROCK_VERSION} rock && \
groupadd --system --gid 10041 rock && \
useradd --system --home /var/lib/rock --no-create-home --uid 10041 --gid rock rock; \
chmod +x /usr/share/rock/bin/rock
COPY bin /opt/obiba/bin
COPY conf/application.yml /usr/share/rock/conf/application.yml
COPY conf/Rserv.conf /usr/share/rock/conf/Rserv.conf
COPY conf/Rprofile.R /usr/share/rock/conf/Rprofile.R
RUN chmod +x -R /opt/obiba/bin && \
chown -R rock /opt/obiba && \
mkdir -p /var/lib/rock/R/library && chown -R rock /var/lib/rock
RUN \
# Additional system dependencies
apt-get update && DEBIAN_FRONTEND=noninteractive apt-get upgrade -y && DEBIAN_FRONTEND=noninteractive apt-get install -y gosu procps libsasl2-dev libssh-dev libjq-dev libgit2-dev libmariadb-dev libmariadb-dev-compat libpq-dev libsodium-dev libgit2-dev libssh2-1-dev openssh-client cmake && \
# Update R packages
#RUN Rscript -e "update.packages(ask = FALSE, repos = c('https://cloud.r-project.org'), instlib = '/usr/local/lib/R/site-library')" && \
# Install required R packages
Rscript -e "install.packages('Rserve', '/usr/local/lib/R/site-library', 'http://www.rforge.net/')" && \
Rscript -e "install.packages(c('resourcer', 's3.resourcer'), repos = c('https://cloud.r-project.org'), lib = c('/var/lib/rock/R/library'), dependencies = TRUE)" && \
chown -R rock:rock /var/lib/rock/R/library && \
chown -R rock:rock $ROCK_HOME
# Install up-to-date version of apache arrow
# Copy script to install deps
COPY scripts/install-arrow.bash .
# Install up-to-date version of apache arrow
RUN \
./install-arrow.bash && \
Rscript -e "install.packages('arrow', lib=c('/usr/local/lib/R/site-library'))"
WORKDIR $ROCK_HOME
VOLUME $ROCK_HOME
EXPOSE 8085
# Define default command.
COPY ./docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["app"]