|
| 1 | +FROM rust:1.78-buster AS builder |
| 2 | + |
| 3 | +# RUN cargo new --bin /app/rastair |
| 4 | +WORKDIR /app |
| 5 | +RUN git clone --branch v0.8.2 https://bitbucket.org/bsblabludwig/rastair.git |
| 6 | +WORKDIR /app/rastair |
| 7 | +RUN cargo build --release |
| 8 | + |
| 9 | +FROM r-base:4.3.2 AS release |
| 10 | + |
| 11 | +LABEL base_image="rust:1.78-buster, r-base:4.3.2" \ |
| 12 | + version="1" \ |
| 13 | + software="rastair" \ |
| 14 | + software.version="v0.8.2" \ |
| 15 | + about.summary="Fast processing of TAPS-based sequencing data" \ |
| 16 | + about.home="https://bitbucket.org/bsblabludwig/rastair/src/v0.8.2/" \ |
| 17 | + about.documentation="https://bitbucket.org/bsblabludwig/rastair/src/v0.8.2/" \ |
| 18 | + about.license="SPDX:GPL-3" \ |
| 19 | + about.tags="Methylation, TAPS" \ |
| 20 | + maintainer= "Andrew Gaines [email protected]" |
| 21 | + |
| 22 | +# Copy the compiled binary from the build stage |
| 23 | +COPY --from=builder /app/rastair/target/release/rastair /usr/local/bin/rastair |
| 24 | + |
| 25 | +# Install system dependencies |
| 26 | +RUN apt update |
| 27 | +RUN apt-get -y upgrade |
| 28 | + |
| 29 | +# Install `ps` command for process monitoring |
| 30 | +RUN apt-get -y install procps |
| 31 | + |
| 32 | +# Install BiocManager for Bioconductor package management |
| 33 | +RUN Rscript -e "install.packages('BiocManager', repos='https://cloud.r-project.org')" |
| 34 | + |
| 35 | +# Install required R and Bioconductor packages |
| 36 | +RUN Rscript -e "BiocManager::install('Rsamtools', version = '3.18', ask = FALSE)" \ |
| 37 | + -e "if (!requireNamespace('remotes', quietly = TRUE)) install.packages('remotes', repos = 'https://cloud.r-project.org')" \ |
| 38 | + -e "remotes::install_version('ggplot2', version = '3.5.1', repos = 'https://cloud.r-project.org')" \ |
| 39 | + -e "remotes::install_version('gtable', version = '0.3.6', repos = 'https://cloud.r-project.org')" |
| 40 | + |
| 41 | +WORKDIR /app |
| 42 | + |
| 43 | +# Copy R scripts |
| 44 | +COPY --from=builder /app/rastair/scripts /app/scripts |
0 commit comments