-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
46 lines (34 loc) · 1000 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM rocker/r-ver:4.2.3
WORKDIR /src/unbiased
# Install system dependencies
RUN apt update && apt-get install -y --no-install-recommends \
# httpuv
libz-dev \
# sodium
libsodium-dev \
# RPostgres
libpq-dev libssl-dev postgresql-client \
curl gnupg2
# Install database migration tool
RUN curl -L https://packagecloud.io/golang-migrate/migrate/gpgkey | apt-key add - && \
echo "deb https://packagecloud.io/golang-migrate/migrate/ubuntu/ focal main" > /etc/apt/sources.list.d/migrate.list && \
apt-get update && \
apt-get install -y migrate
ENV RENV_CONFIG_SANDBOX_ENABLED=FALSE
COPY ./renv ./renv
COPY .Rprofile .
# Both renv.lock and DESCRIPTION are needed to restore the R environment
COPY renv.lock .
COPY DESCRIPTION .
RUN R -e 'renv::restore()'
COPY .Rbuildignore .
COPY NAMESPACE .
COPY inst/ ./inst
COPY R/ ./R
COPY tests/ ./inst/tests
RUN R -e "devtools::install('.')"
COPY *.sh ./
EXPOSE 3838
ARG github_sha
ENV GITHUB_SHA=${github_sha}
CMD ["./entrypoint.sh"]