Skip to content

Commit

Permalink
Update Dockerfiles with instructions for older R / CRAN releases
Browse files Browse the repository at this point in the history
  • Loading branch information
sneumann committed Dec 6, 2023
1 parent 956712d commit 086f38d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 15 deletions.
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
FROM sneumann/metfamily-base:latest
#FROM sneumann/metfamily-base:latest
FROM sneumann/metfamily-base:4.3.2
#FROM sneumann/metfamily-base:4.0.5
#FROM sneumann/metfamily-base:3.6.3

MAINTAINER Kristian Peters <kpeters@ipb-halle.de>
MAINTAINER Steffen Neumann <sneumann@ipb-halle.de>

LABEL Description="MetFamily helps identifying metabolites and groups them into metabolite clusters (a.k.a. families)."

Expand Down
31 changes: 18 additions & 13 deletions Dockerfile-base
Original file line number Diff line number Diff line change
@@ -1,30 +1,35 @@
# syntax=docker/dockerfile:1.3-labs
FROM rocker/shiny:3.6.3
FROM rocker/shiny:4.3.2

MAINTAINER Kristian Peters <kpeters@ipb-halle.de>
MAINTAINER Steffen Neumann <sneumann@ipb-halle.de>

LABEL Description="MetFamily Base Image with dependencies."

## Older base images might need libigraph0-dev instead of libigraph-dev
RUN apt-get -y --allow-releaseinfo-change update && apt-get -y install \
netcdf-bin libnetcdf-dev libdigest-sha-perl libigraph0-dev \
netcdf-bin libnetcdf-dev libdigest-sha-perl libigraph-dev \
xorg-dev libglu1-mesa-dev freeglut3-dev libgomp1 libxml2-dev gcc g++ libcurl4-gnutls-dev libssl-dev gdebi-core libharfbuzz-dev libfribidi-dev libtiff5-dev

ENV NETCDF_INCLUDE=/usr/include
RUN echo 'sanitize_errors off;disable_protocols xdr-streaming xhr-streaming iframe-eventsource iframe-htmlfile;' >> /etc/shiny-server/shiny-server.conf

COPY <<EOF /root/.Rprofile
local({
r <- getOption(\"repos\")
r[\"CRAN\"] <- \"https://packagemanager.posit.co/cran/2020-04-23/\"
options(repos=r)
})
EOF
## The following Rprofile allows to use CRAN snapshots
## (The HERE document COPY <<EOF requires syntax=docker/dockerfile:1.3-labs)
## We have tested the following combinations of FROM and CRAN:
## rocker/shiny:3.6.3 https://packagemanager.posit.co/cran/2020-04-23/
## rocker/shiny:4.0.5 https://packagemanager.posit.co/cran/2021-03-01/
## rocker/shiny:4.3.2 https://packagemanager.posit.co/cran/2023-12-01/

## COPY <<EOF /root/.Rprofile
## local({
## r <- getOption(\"repos\")
## r[\"CRAN\"] <- \"https://packagemanager.posit.co/cran/2021-03-01/\"
## options(repos=r)
## })
## EOF

ADD DESCRIPTION /tmp/MetFamily/DESCRIPTION
RUN R -e 'options(warn=2) ; install.packages("devtools")'
RUN R -e 'options(warn=2) ; install.packages("XML")'
RUN R -e 'options(warn=2) ; install.packages("MALDIquant")'
RUN R -e 'options(warn=2) ; install.packages("FactoMineR")'
RUN R -e 'library(devtools); options(warn=2) ; install_deps("/tmp/MetFamily")'

WORKDIR /srv/shiny-server

0 comments on commit 086f38d

Please sign in to comment.