-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile_binder
42 lines (32 loc) · 2.15 KB
/
Dockerfile_binder
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
FROM rocker/binder:latest
#....................................................................................
# this Dockerfile calls the "rocker/binder:latest" which uses the "rocker/geospatial"
# see: https://hub.docker.com/r/rocker/binder
#....................................................................................
#.............................................................
# Adds binder abilities on top of the rocker/geospatial images
# see: https://hub.docker.com/r/rocker/binder
#.............................................................
LABEL maintainer='Lampros Mouselimis'
#.....................................................................................
# Due to the 'binder' image I have to install dependencies as root
# see: https://github.com/SeleniumHQ/docker-selenium/issues/725#issuecomment-381734966
#.....................................................................................
ENV DEBIAN_FRONTEND=noninteractive
USER root
RUN apt-get -y update && \
apt-get install -y unzip && \
apt-get install -y awscli && \
R -e "install.packages('devtools', dependencies = TRUE, repos = 'https://cloud.r-project.org/')" && \
R -e "install.packages(c( 'glue', 'sf', 'lwgeom', 'units', 'data.table', 'httr', 'utils', 'foreach', 'tools', 'doParallel', 'magrittr', 'leaflet', 'leafgl', 'leaflet.extras', 'leafsync', 'miniUI', 'shiny', 'rnaturalearth', 'rmarkdown', 'knitr', 'lubridate', 'rvest', 'DT', 'mapview', 'grDevices', 'stargazer', 'reshape2', 'plotly', 'geodist', 'CopernicusDEM', 'terra', 'testthat', 'remotes' ), repos = 'https://cloud.r-project.org/' )"
#.........................................................
# whenever I push make sure that the 'IceSat2R' R package
# is updated in the docker image and not cached
#.........................................................
ADD http://www.random.org/strings/?num=10&len=8&digits=on&upperalpha=on&loweralpha=on&unique=on&format=plain&rnd=new uuid
ARG BUILD_DATE
RUN echo "$BUILD_DATE"
RUN R -e "remotes::install_github('mlampros/IceSat2R', upgrade = 'always', dependencies = TRUE, repos = 'https://cloud.r-project.org/')" && \
apt-get autoremove -y && \
apt-get clean
ENV USER rstudio