-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
executable file
·99 lines (76 loc) · 2.86 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
88
89
90
91
92
93
94
95
96
97
98
99
# Use the Docker image format
# syntax=docker/dockerfile:1
FROM ruby:3.1.2-alpine
RUN apk add R \
R-dev \
build-base \
gcc \
g++ \
gfortran \
make \
cmake \
bash \
git \
libxml2-dev \
openssl-dev \
libcurl \
curl-dev \
libpng-dev \
libjpeg-turbo-dev \
libxt-dev \
openblas-dev\
cairo-dev \
pango-dev \
gdk-pixbuf-dev \
musl-dev \
postgresql-dev git build-base nodejs npm yarn busybox-extras curl wget openjdk8-jre less gzip unzip
RUN echo 'toto'
# Install lattice from CRAN
RUN Rscript -e "install.packages('lattice', repos='https://cloud.r-project.org')"
# Install MASS and Matrix from CRAN archive
RUN Rscript -e "install.packages('https://cran.r-project.org/src/contrib/Archive/MASS/MASS_7.3-55.tar.gz', repos=NULL, type='source')"
RUN Rscript -e "install.packages('https://cran.r-project.org/src/contrib/Archive/Matrix/Matrix_1.4-0.tar.gz', repos=NULL, type='source')"
# Install MatrixModels from CRAN archive
RUN Rscript -e "install.packages('https://cran.r-project.org/src/contrib/Archive/MatrixModels/MatrixModels_0.4-1.tar.gz', repos=NULL, type='source')"
RUN Rscript -e "install.packages(c('quantreg', 'data.table', 'jsonlite', 'car', 'rstatix'), repos='http://stat.ethz.ch/CRAN/');"
# Install BiocManager if not already installed
RUN Rscript -e "if (!requireNamespace('BiocManager', quietly = TRUE)) install.packages('BiocManager', repos='https://cloud.r-project.org')"
# Install ramwas using BiocManager
RUN Rscript -e "BiocManager::install('ramwas')"
# Install R.utils package
RUN Rscript -e "install.packages('R.utils', repos='https://cloud.r-project.org')"
# Install the Cairo package in R
RUN R -e "install.packages('Cairo', repos='http://cran.r-project.org')"
# Verify R installation
RUN R --version
# Verify Rscript installation
RUN Rscript --version
# Set the PLINK2 version and download URL
#ENV PLINK2_VERSION="2.00a3.3LM"
ENV PLINK2_URL="https://s3.amazonaws.com/plink2-assets/plink2_linux_x86_64_latest.zip"
# Create a directory for plink2
RUN mkdir -p /opt/plink2
# Download and install plink2
RUN wget -q ${PLINK2_URL} -O /opt/plink2/plink2.zip && \
unzip /opt/plink2/plink2.zip -d /opt/plink2 && \
chmod +x /opt/plink2/plink2 && \
rm /opt/plink2/plink2.zip
# Add plink2 to the PATH
ENV PATH="/opt/plink2:${PATH}"
# Test if plink2 is installed
RUN plink2 --version
RUN mkdir -p /opt/mimemagic
WORKDIR /opt/dgrpool
ENV FREEDESKTOP_MIME_TYPES_PATH=/opt/mimemagic
COPY src/Gemfile .
RUN bundle install
COPY src/. .
CMD ["rm ./tmp/pids/server.pid"]
# Add health check script
COPY healthcheck.sh ./
# Set execute permissions
RUN chmod +x /opt/dgrpool/healthcheck.sh
# Define health check
HEALTHCHECK --interval=30s --timeout=10s --start-period=5s --retries=3 CMD /opt/dgrpool/healthcheck.sh || exit 1
# Start solr server, esbuild and scss builders and puma server
CMD ["sh", "start.sh"]