Skip to content
Snippets Groups Projects
Commit f278a32d authored by Laurent BEAULATON's avatar Laurent BEAULATON
Browse files

Merge branch '31-mise-a-jour-des-versions-de-docker' into 'develop0.6.0'

Resolve "mise à jour des versions de docker"

Closes #31

See merge request !10
parents 103d33b2 dbeb4773
No related branches found
No related tags found
1 merge request!10Resolve "mise à jour des versions de docker"
Pipeline #300534 passed
......@@ -6,14 +6,14 @@ variables:
tag_dev: "dev"
imagedb_name: "stacomi_db"
db_version: "0.6.0"
postgres_version: "14"
postgis_version: "3.2"
postgres_version: "17"
postgis_version: "3.5"
POSTGRES_PASSWORD: postgres
imager_name: "environnement_test_r"
r_version: "0.1"
imageR_name: "r4stacomi"
r_base_version: "4.x"
docker_version: "20.10"
r_base_version: "4.4"
docker_version: "28.0"
docker_version_dind: "${docker_version}-dind"
PG_USER: stacomi_test
PG_USER_PASSWORD: stacomi_test
......
ARG ubuntu_version=22.04
FROM ubuntu:${ubuntu_version}
ENV DEBIAN_FRONTEND=noninteractive
RUN (apt-get update && apt-get upgrade -y -q && apt-get -y -q autoclean && apt-get -y -q autoremove)
# base d'utilitaires commun (pour mutualisation avec d'autres dockers)
RUN apt-get update && apt-get install -y -q vim apt-utils \
sudo wget unzip \
# pour envsubst
gettext-base \
# pour pouvoir lancer les services avec systemctl depuis un docker (https://packages.debian.org/bullseye/systemctl)
systemctl \
build-essential \
git \
# # pour le package R curl
# libcurl4-openssl-dev libxml2-dev libssl-dev libz-dev \
# # pour le package R Rpotsgres
# libpq-dev libssl-dev \
# pour le package R stacomiR
gfortran qpdf \
&& rm -rf /var/lib/apt/lists/*
# installation des dépendances
RUN apt-get update && apt-get install -y -q -y --no-install-recommends \
software-properties-common dirmngr \
&& rm -rf /var/lib/apt/lists/*
# https://cran.r-project.org/bin/linux/ubuntu/
RUN wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | \
sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc \
&& add-apt-repository --yes "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/" && apt-get update -qq \
&& apt-get install -y -q --no-install-recommends r-base \
&& add-apt-repository --yes ppa:c2d4u.team/c2d4u4.0+ && apt-get update -qq \
&& rm -rf /var/lib/apt/lists/*
# our required R packages
RUN apt-get update -qq && apt-get install -y -q --no-install-recommends \
r-cran-sqldf \
r-cran-rpostgresql r-cran-rpostgres r-cran-docopt littler r-cran-rodbc r-cran-devtools r-cran-golem \
r-cran-hmisc r-cran-shinydashboardplus r-cran-htmltools r-cran-shinybs r-cran-shinyjs \
r-cran-pool r-cran-shinywidgets r-cran-glue r-cran-rms r-cran-rcurl r-cran-xml r-cran-intervals \
r-cran-rcolorbrewer r-cran-covr r-cran-dt r-cran-reshape2 r-cran-dplyr r-cran-remotes \
r-cran-lattice r-cran-hmisc r-cran-lubridate r-cran-mgcv r-cran-ggthemes r-cran-withr r-cran-rmarkdown \
&& rm -rf /var/lib/apt/lists/*
RUN ln -s /usr/lib/R/site-library/littler/examples/install2.r /usr/local/bin/install2.r
RUN install2.r --deps TRUE --repos "https://pbil.univ-lyon1.fr/CRAN/" \
--error --skipinstalled stacomirtools graphics utils stats grDevices
\ No newline at end of file
......@@ -2,7 +2,7 @@ ARG postgresql_version=14
ARG postgis_version=3.2
FROM postgis/postgis:${postgresql_version}-${postgis_version}
RUN localedef -i fr_FR -c -f UTF-8 -A /usr/share/locale/locale.alias fr_FR.UTF-8
ENV LANG fr_FR.utf8
ENV LANG=fr_FR.utf8
# script de construction de la base
# attention doit commencer à 11 car il y a un 10_postgis.sh
......
......@@ -9,7 +9,8 @@ build_db-dev:
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/docker:$docker_version
stage: build_images
services:
- docker:$docker_version_dind
- name: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/docker:$docker_version_dind
alias: docker
extends:
- .rules_other
script:
......@@ -24,7 +25,8 @@ build_db-prod:
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/docker:$docker_version
stage: build_images
services:
- docker:$docker_version_dind
- name: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/docker:$docker_version_dind
alias: docker
extends:
- .rules_main
when: manual
......
......@@ -4,7 +4,7 @@
# template for the test
.test_psql_template:
stage: test
image: postgres:${postgres_version}
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/postgres:${postgres_version}
before_script:
- echo "En attente de la disponibilité de PostgreSQL"
- |
......
......@@ -4,6 +4,8 @@
# template for the test
.test_r_template:
stage: test
before_script:
- Rscript -e 'R.version'
script:
- Rscript -e '1+1'
- Rscript -e 'a<-1; a+1'
......@@ -13,7 +15,7 @@
#######################
# for any branch, but main
test_r-dev:
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/rocker/verse
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/rocker/verse:${r_base_version}
needs:
- build_db-dev
- test_psql-dev
......@@ -26,7 +28,7 @@ test_r-dev:
#######################
# for main banch only
test_r-prod:
image: $CI_REGISTRY_IMAGE/$imageR_name:latest
image: ${CI_DEPENDENCY_PROXY_DIRECT_GROUP_IMAGE_PREFIX}/rocker/verse:${r_base_version}
needs:
- build_db-prod
extends:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment