-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (25 loc) · 769 Bytes
/
Dockerfile
File metadata and controls
33 lines (25 loc) · 769 Bytes
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
FROM rocker/r-ver:4.2.0
# Install system dependencies
RUN apt-get update && apt-get install -y \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
libgit2-dev \
git \
&& rm -rf /var/lib/apt/lists/*
# Install R packages
RUN R -e "install.packages(c('remotes', 'renv'))"
# Copy renv files
COPY renv.lock renv.lock
COPY renv/ renv/
# Restore packages from renv.lock
RUN R -e "renv::restore()"
# Install additional packages needed for the pipeline
RUN R -e "install.packages(c('targets', 'tarchetypes', 'config', 'googleCloudStorageR', 'googleAuthR'))"
# Copy project files
COPY . /app
WORKDIR /app
# Set environment variables
ENV GCS_AUTH_FILE=/secrets/service-account.json
# Run the targets pipeline
CMD ["R", "-e", "targets::tar_make()"]