-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathDockerfile
87 lines (68 loc) · 3 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
# RStudio container used for Galaxy RStudio Integration
FROM rocker/rstudio:4.4
ARG CONDA_VERSION=24.11.2
ARG SUFFIX=1
ARG MINIFORGE_VERSION=${CONDA_VERSION}-${SUFFIX}
ARG R_VERSION=4.4
ENV CONDA_PATH=/opt/miniconda \
MINICONDA_BIN_DIR="/opt/miniconda/bin" \
PATH="${PATH}:${MINICONDA_BIN_DIR}" \
R_HOME='/opt/miniconda/lib/R'
RUN apt-get -qq update && \
apt-get install --no-install-recommends -y wget psmisc procps sudo \
libcurl4-openssl-dev curl libxml2-dev net-tools \
lsb-release unixodbc unixodbc-dev odbcinst odbc-postgresql \
texlive-latex-base texlive-extra-utils texlive-fonts-recommended \
texlive-latex-recommended libapparmor1 libedit2 libcurl4-openssl-dev libssl-dev zlib1g-dev \
libbz2-dev liblzma-dev && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN cd /opt/ && \
wget -q "https://github.com/conda-forge/miniforge/releases/download/${MINIFORGE_VERSION}/Miniforge3-${MINIFORGE_VERSION}-Linux-x86_64.sh" \
-O miniforge3.sh && \
bash "./miniforge3.sh" -b -p ${CONDA_PATH} && \
rm ./miniforge3.sh && \
${MINICONDA_BIN_DIR}/conda clean -tipy && \
echo "conda activate base" >> "$CONDA_PATH/etc/profile.d/conda.sh" && \
ln -s "$CONDA_PATH/etc/profile.d/conda.sh" /etc/profile.d/conda.sh && \
echo ". $CONDA_PATH/etc/profile.d/conda.sh" >> ~/.bashrc && \
chmod 777 ${CONDA_PATH} -R && \
chmod 777 /tmp
COPY requirements.txt /tmp/requirements.txt
USER rstudio
RUN /opt/miniconda/bin/conda update -n base --yes conda \
&& /opt/miniconda/bin/conda config --append channels bioconda \
&& /opt/miniconda/bin/conda install --file /tmp/requirements.txt r-base=${R_VERSION} -y \
&& /opt/miniconda/bin/conda clean -a
USER root
#COPY service-nginx-start /etc/services.d/nginx/run
#COPY service-nginx-stop /etc/services.d/nginx/finish
#COPY proxy.conf /etc/nginx/sites-enabled/default
# ENV variables to replace conf file from Galaxy
ENV DEBUG=false \
GALAXY_WEB_PORT=10000 \
CORS_ORIGIN=none \
DOCKER_PORT=none \
API_KEY=none \
HISTORY_ID=none \
REMOTE_HOST=none \
GALAXY_URL=none \
RSTUDIO_FULL=1 \
DISABLE_AUTH=true
WORKDIR /import/
ADD ./GalaxyConnector /tmp/GalaxyConnector
ADD ./packages/ /tmp/packages/
ADD ./logging.conf /etc/rstudio/
# The Galaxy instance can copy in data that needs to be present to the Rstudio webserver
RUN chmod 777 /import/
# the symlinks should be removed once the R scripts for gx_get/gx_put are smart enough to take the global put/get
RUN sed -i 's|/usr/local/bin/R|/opt/miniconda/bin/R|g' /etc/rstudio/disable_auth_rserver.conf \
&& ln -s /opt/miniconda/bin/get /usr/local/bin/get \
&& ln -s /opt/miniconda/bin/put /usr/local/bin/put
RUN /opt/miniconda/bin/Rscript /tmp/packages/gx.R
# Must happen later, otherwise GalaxyConnector is loaded by default, and fails,
# preventing ANY execution
#COPY ./Rprofile.site /opt/miniconda/lib/R/etc/Rprofile.site
COPY ./Rprofile.site /home/rstudio/.Rprofile
EXPOSE 80