generated from CDCgov/template
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
28 lines (20 loc) · 957 Bytes
/
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
FROM docker.io/rocker/geospatial:4.4.1
# Will copy the package to the container preserving the directory structure
RUN mkdir -p pkg
COPY ./DESCRIPTION pkg/
# Installing missing dependencies
RUN apt-get update && apt-get install -y --no-install-recommends pandoc-citeproc
RUN install2.r pak
# dependencies = TRUE means we install `suggests` too
RUN Rscript -e 'pak::local_install_deps("pkg", upgrade = FALSE, dependencies = TRUE)'
# This requires access to the Azure Container Registry
# FROM ghcr.io/cdcgov/cfa-epinow2-pipeline:${TAG}
# Will copy the package to the container preserving the directory structure
COPY . pkg/
# Install the full package while leaving the tar.gz file in the
# container for later use.
RUN R CMD build --no-build-vignettes --no-manual pkg && \
R CMD INSTALL CFAEpiNow2Pipeline_*.tar.gz
# Ensure the package is working properly
RUN R CMD check --no-build-vignettes --no-manual CFAEpiNow2Pipeline_*.tar.gz
CMD ["bash"]