-
Notifications
You must be signed in to change notification settings - Fork 29
/
Dockerfile-dev
44 lines (33 loc) · 1.42 KB
/
Dockerfile-dev
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
# docker build -f Dockerfile-dev . --tag degust-dev
# docker run --env SECRET_KEY_BASE=test -p 8001:3000 \
# --volume $(pwd):/opt/degust \
# degust-dev
FROM ubuntu:noble
ARG DEBIAN_FRONTEND=noninteractive
# Install node and R
RUN apt-get update \
&& apt-get install -y curl git libsqlite3-dev libxml2-dev libssl-dev libcurl4-openssl-dev \
&& curl -sL https://deb.nodesource.com/setup_18.x | bash - \
&& echo "deb http://cran.rstudio.org/bin/linux/ubuntu noble-cran40/" > '/etc/apt/sources.list.d/r-base.list' \
&& apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key 51716619E084DAB9 \
&& apt-get update \
&& apt-get install -y nodejs r-base \
&& rm -rf /var/lib/apt/lists/*
# Install ruby
RUN git clone https://github.com/rbenv/ruby-build.git \
&& PREFIX=/usr/local ./ruby-build/install.sh \
&& ruby-build -v 2.4.6 /usr/local
# Install R libs
RUN Rscript -e "install.packages(c('BiocManager','jsonlite')); BiocManager::install(pkgs=c('limma','edgeR','topconfects','RUVSeq'),version='3.19', ask=F)"
ENV RAILS_ENV=development
# Grab Gemfile first so we can cache the docker layer from gems
WORKDIR /opt/degust
COPY Gemfile Gemfile.lock /opt/degust/
RUN gem install bundler -v 2.3.5 \
&& bundle install
# Grab the rest of degust
COPY . /opt/degust/
# install the js deps
RUN rake degust:deps
# Run server (this will also migrate the db if necessary)
CMD ["/opt/degust/scripts/run-dev.sh"]