-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
29 lines (21 loc) · 1.07 KB
/
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
FROM r-base:4.3.0
# Install software dependencies
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y software-properties-common cmake g++ git supervisor wget
ENV TZ=Etc/UTC
RUN apt-get install -y libnetcdf-dev libcurl4-openssl-dev libcpprest-dev doxygen graphviz libsqlite3-dev libboost-all-dev
RUN apt-get update && apt-get install -y libproj-dev libgdal-dev
# Install devtools package
RUN R -e "install.packages('devtools')"
# Install gdalcubes package
RUN R -e "install.packages('gdalcubes')"
# install other necessary packages
RUN apt-get install -y libsodium-dev libudunits2-dev
RUN Rscript -e "install.packages(c('plumber', 'useful', 'ids', 'R6', 'sf', 'rstac','bfast'))"
# create directories
RUN mkdir -p /opt/dockerfiles/ && mkdir -p /var/openeo/workspace/ && mkdir -p /var/openeo/workspace/data/
# install packages from local directory
COPY ./ /opt/dockerfiles/
RUN Rscript -e "remotes::install_local('/opt/dockerfiles',dependencies=TRUE)"
# cmd or entrypoint for startup
CMD ["R", "-q", "--no-save", "-f /opt/dockerfiles/startProduction.R"]
EXPOSE 8000