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

Dockerfiles: makefile and readme.

parent 3ce056ad
Pipeline #16827 failed with stages
in 7 seconds
# Use the shiny-verse Docker image for the run
# (Includes, devtools, tidyverse, ...)
# https://hub.docker.com/r/rocker/shiny-verse/
image: registry.forgemia.inra.fr/umr-astre/mapmcda/mapmcda_testenv
pages:
stage: deploy
script:
......
VERS=$(subst test_environment/Dockerfile_,,$(wildcard test_environment/Dockerfile_*))
.PHONY: debug build push
.PHONY: $(VERS) $(addprefix push,$(VERS))
all: build push
debug:
@echo "R versions: $(VERS)"
build: $(VERS)
# https://www.gnu.org/software/make/manual/make.html#Static-Pattern
$(VERS): %: test_environment/Dockerfile_%
docker build --pull=true -f $< \
-t registry.forgemia.inra.fr/umr-astre/mapmcda/mapmcda_testenv:$@ \
..
push: $(addprefix push_,$(VERS))
$(addprefix push_,$(VERS)): push_%: %
docker push registry.forgemia.inra.fr/umr-astre/mapmcda/mapmcda_testenv:$<
# Build
# Testing environments for mapMCDA
Run from within project root (build context):
Under `test_environment` we store Dockerfiles defining three computing environments
for testing mapMCDA:
- `oldrel`: the latest major release of R,
- `release`: the current release of R
- `devel`: the next major release, under development
The images are built locally (see Makefile) and pushed to the [Docker registry
at Forgemia](https://forgemia.inra.fr/umr-astre/mapMCDA/container_registry).
These images are used for Continuous Integration testing ([`.gitlab-ci.yml`](https://forgemia.inra.fr/umr-astre/mapMCDA/-/blob/master/.gitlab-ci.yml)).
The images are based on the [Rocker-versioned
images](https://hub.docker.com/r/rocker/r-ver) which in turn are based on either
Debian (for R < 4.0) or Ubuntu (for R >= 4.0).
For `oldrel`, package dependencies are installed from a CRAN snapshot at the
last date that particular R version was current. The result is an old R version
with contemporary versions of R-packages (i.e. not latest versions).
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
You can experiment with a container using the development version of R with
all needed mapMCDA dependencies from both the system and R-packages.
docker run --rm -ti registry.forgemia.inra.fr/umr-astre/mapmcda/mapmcda_testenv:devel
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