Commit 3ce056ad authored by Facundo Muñoz's avatar Facundo Muñoz ®️
Browse files

dockerfiles: git track

parent 0441e8e1
......@@ -12,7 +12,8 @@
^R/pkg_deps.R
^CONDUCT\.md$
^inst/Example
^dev
^dev$
^dockerfiles$
^_pkgdown\.yml$
^\.gitlab-ci\.yml
^ci
......
# Build
Run from within project root (build context):
docker build . -f dev/dockerfiles/test_environment/Dockerfile_release -t registry.forgemia.inra.fr/umr-astre/mapmcda/mapmcda_testenv:release --pull=true
# Run
docker run --rm -ti -p 8787:8787 registry.forgemia.inra.fr/umr-astre/mapmcda/mapmcda_testenv
# Run mapMCDA in a docker container
# (c) 2020 Facundo Muñoz
# Licence GPL-3
# Adapted from:
# https://hub.docker.com/r/colebrokamp/rize/dockerfile
FROM mapmcda_testenv
RUN R -e 'remotes::install_local()'
RUN rm -rf /tmp/downloaded_packages/ /tmp/*.rds
EXPOSE 80
CMD R -e "options('shiny.port'=80,shiny.host='0.0.0.0');library(mapMCDA);shiny::runApp(system.file(\"interface\", package = \"mapMCDA\"), launch.browser = FALSE)"
FROM rocker/r-ver:devel
LABEL maintainer="Facundo Muñoz facundo.munoz@cirad.fr"
ENV CI_PROJECT_DIR="/builds/umr-astre/mapMCDA"
# Install external dependencies
RUN export DEBIAN_FRONTEND=noninteractive; apt-get -qq update \
&& apt-get install -y --no-install-recommends \
libv8-dev \
libjq-dev \
libprotobuf-dev \
protobuf-compiler \
libfontconfig1-dev \
gdal-bin \
libgdal-dev \
libglpk-dev \
libgmp-dev \
libproj-dev \
libxml2-dev \
libudunits2-dev \
libcairo2-dev \
qpdf \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/
# Install R-package dependencies for running mapMCDA
RUN ["install2.r", "remotes", "igraph", "raster", "rgdal", "rhandsontable", "shiny", "shinydashboard", "shinyFiles", "sp", "usethis", "deldir", "geojsonio", "geojsonlint", "geonetwork", "maps", "maptools", "plyr", "rasterVis", "RColorBrewer", "rgeos", "DBI", "units", "e1071", "urltools", "httpcode", "triebeard", "hms", "protolite", "jqr", "V8", "png", "jpeg", "sf", "crul", "readr", "geojson", "jsonvalidate", "geosphere", "latticeExtra", "hexbin", "zoo", "viridisLite"]
# Install R-packages dependencies for building mapMCDA
RUN ["install2.r", "devtools", "knitr", "lintr", "mapview", "rmarkdown", "roxygen2", "testthat"]
# Clean up
RUN rm -rf /tmp/downloaded_packages/ /tmp/*.rds
# Copy mapMCDA source directory
COPY . $CI_PROJECT_DIR
# Build package
# Don't build. That is part of the check.
# RUN R CMD build /builds/umr-astre/mapMCDA
# Set up environment
WORKDIR $CI_PROJECT_DIR
RUN echo 'alias ll="ls -lh --color=tty"' >> ~/.bashrc
CMD ["R"]
FROM rocker/r-ver:3.6.3
LABEL maintainer="Facundo Muñoz facundo.munoz@cirad.fr"
ENV CI_PROJECT_DIR="/builds/umr-astre/mapMCDA"
# Install external dependencies
RUN export DEBIAN_FRONTEND=noninteractive; apt-get -qq update \
&& apt-get install -y --no-install-recommends \
libv8-dev \
libjq-dev \
libprotobuf-dev \
protobuf-compiler \
libfontconfig1-dev \
gdal-bin \
libgdal-dev \
libglpk-dev \
libgmp-dev \
libproj-dev \
libxml2-dev \
libudunits2-dev \
libcairo2-dev \
qpdf \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/
# Install R-package dependencies for running mapMCDA
RUN ["install2.r", "remotes", "igraph", "raster", "rgdal", "rhandsontable", "shiny", "shinydashboard", "shinyFiles", "sp", "usethis", "deldir", "geojsonio", "geojsonlint", "geonetwork", "maps", "maptools", "plyr", "rasterVis", "RColorBrewer", "rgeos", "DBI", "units", "e1071", "urltools", "httpcode", "triebeard", "hms", "protolite", "jqr", "V8", "png", "jpeg", "sf", "crul", "readr", "geojson", "jsonvalidate", "geosphere", "latticeExtra", "hexbin", "zoo", "viridisLite"]
# Install R-packages dependencies for building mapMCDA
RUN ["install2.r", "devtools", "knitr", "lintr", "mapview", "rmarkdown", "roxygen2", "testthat"]
# Clean up
RUN rm -rf /tmp/downloaded_packages/ /tmp/*.rds
# Copy mapMCDA source directory
COPY . $CI_PROJECT_DIR
# Build package
# Don't build. That is part of the check.
# RUN R CMD build /builds/umr-astre/mapMCDA
# Set up environment
WORKDIR $CI_PROJECT_DIR
RUN echo 'alias ll="ls -lh --color=tty"' >> ~/.bashrc
CMD ["R"]
FROM rocker/r-ver:latest
LABEL maintainer="Facundo Muñoz facundo.munoz@cirad.fr"
ENV CI_PROJECT_DIR="/builds/umr-astre/mapMCDA"
# Install external dependencies
RUN export DEBIAN_FRONTEND=noninteractive; apt-get -qq update \
&& apt-get install -y --no-install-recommends \
libv8-dev \
libjq-dev \
libprotobuf-dev \
protobuf-compiler \
libfontconfig1-dev \
gdal-bin \
libgdal-dev \
libglpk-dev \
libgmp-dev \
libproj-dev \
libxml2-dev \
libudunits2-dev \
libcairo2-dev \
qpdf \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/
# Install R-package dependencies for running mapMCDA
RUN ["install2.r", "remotes", "igraph", "raster", "rgdal", "rhandsontable", "shiny", "shinydashboard", "shinyFiles", "sp", "usethis", "deldir", "geojsonio", "geojsonlint", "geonetwork", "maps", "maptools", "plyr", "rasterVis", "RColorBrewer", "rgeos", "DBI", "units", "e1071", "urltools", "httpcode", "triebeard", "hms", "protolite", "jqr", "V8", "png", "jpeg", "sf", "crul", "readr", "geojson", "jsonvalidate", "geosphere", "latticeExtra", "hexbin", "zoo", "viridisLite"]
# Install R-packages dependencies for building mapMCDA
RUN ["install2.r", "devtools", "knitr", "lintr", "mapview", "rmarkdown", "roxygen2", "testthat"]
# Clean up
RUN rm -rf /tmp/downloaded_packages/ /tmp/*.rds
# Copy mapMCDA source directory
COPY . $CI_PROJECT_DIR
# Build package
# Don't build. That is part of the check.
# RUN R CMD build /builds/umr-astre/mapMCDA
# Set up environment
WORKDIR $CI_PROJECT_DIR
RUN echo 'alias ll="ls -lh --color=tty"' >> ~/.bashrc
CMD ["R"]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment