Skip to content

Commit

Permalink
Merge pull request #104 from SermetPekin/Dockerfile_for_rocker
Browse files Browse the repository at this point in the history
Update Dockerfile to Use Rocker R Image
  • Loading branch information
roninsightrx committed Jul 9, 2024
2 parents 420bbf1 + cdd7b7c commit 91ad163
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 7 deletions.
21 changes: 14 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
FROM 579831337053.dkr.ecr.us-west-2.amazonaws.com/irx-r-base:latest
FROM rocker/r-ver:latest

ENV _R_CHECK_TESTS_NLINES_=0

RUN rm -rf /src/PKPDsim
COPY ./ /src/PKPDsim
WORKDIR /src/PKPDsim

# Install system and CRAN dependencies
RUN apt-get update
RUN apt install -y pandoc qpdf
RUN Rscript -e "install.packages(c('mockery', 'nlmixr2', 'knitr', 'rmarkdown'), repos = '${RSPM_SNAPSHOT}')"
COPY ./ /src/PKPDsim

RUN apt-get update && apt-get install -y \
pandoc \
qpdf \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*


RUN Rscript -e "install.packages(c('mockery', 'nlmixr2', 'knitr', 'rmarkdown'), repos = 'https://cloud.r-project.org')"

RUN R CMD check PKPDsim

12 changes: 12 additions & 0 deletions Dockerfile.aws
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM 579831337053.dkr.ecr.us-west-2.amazonaws.com/irx-r-base:latest

ENV _R_CHECK_TESTS_NLINES_=0

RUN rm -rf /src/PKPDsim
COPY ./ /src/PKPDsim
WORKDIR /src/PKPDsim

# Install system and CRAN dependencies
RUN apt-get update
RUN apt install -y pandoc qpdf
RUN Rscript -e "install.packages(c('mockery', 'nlmixr2', 'knitr', 'rmarkdown'), repos = '${RSPM_SNAPSHOT}')"
19 changes: 19 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: '3'
services:
pkpdsim:
build:
context: .
dockerfile: Dockerfile
image: pkpdsim:latest

pkpdsim-aws:
build:
context: .
dockerfile: Dockerfile.aws
image: pkpdsim:aws

# docker-compose build
# docker-compose build pkpdsim
# docker-compose build pkpdsim-aws
# docker-compose run pkpdsim
# docker-compose run pkpdsim-aws

0 comments on commit 91ad163

Please sign in to comment.