-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
36 lines (26 loc) · 1.33 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
FROM bioconductor/bioconductor_docker:RELEASE_3_19
LABEL name="jorainer/spectra_tutorials" \
url="https://github.com/jorainer/SpectraTutorials" \
maintainer="[email protected]" \
description="Docker container to run the Spectra tutorials." \
license="Artistic-2.0"
WORKDIR /home/rstudio
COPY --chown=rstudio:rstudio . /home/rstudio/
## Setup MySQL and fill with MassBank data
RUN groupadd -r mysql && useradd -r -g mysql mysql
RUN apt-get update; \
apt-get install -y libgit2-dev; \
apt-get install -y mariadb-server; \
chown -R mysql:mysql /var/lib/mysql /var/run/mysqld; \
chmod 777 /var/run/mysqld; \
chmod 777 -R /var/lib/mysql;
RUN service mariadb start; \
mysql < scripts/mysql-prepare.sql;
## Download and install MassBank
RUN scripts/install-massbank.sh
## Setup init scripts for mariadb
RUN scripts/mysql-init.sh
## Install the SpectraTutorials package and additional required packages
RUN Rscript -e "options(repos = c(CRAN = 'https://cran.r-project.org')); BiocManager::install(ask = FALSE); BiocManager::install('MsBackendMassbank'); BiocManager::install('MsBackendSql')"
RUN service mariadb start && \
Rscript -e "options(repos = c(CRAN = 'https://cran.r-project.org')); devtools::install('.', dependencies = TRUE, build_vignettes = TRUE, repos = BiocManager::repositories())"