From 0425770c3a2dde2a087761f7bb4757700d719777 Mon Sep 17 00:00:00 2001 From: David Dorchies <david.dorchies@inrae.fr> Date: Thu, 7 Dec 2023 09:38:42 +0000 Subject: [PATCH] feat: import Cassiopee DockerFile and adapt devcontainer.json For use in vscode with the good version of the image Refs #639 --- .devcontainer/devcontainer.json | 6 ++-- Dockerfile | 63 +++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 Dockerfile diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 86682b501..9a283c6d0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,13 +3,15 @@ { "name": "Cassiopée", // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile - "image": "geaucassiopee/ci-cd-cross-platform-webapp:v3", + //"image": "geaucassiopee/ci-cd-cross-platform-webapp:v3", + "build": { "dockerfile": "../Dockerfile" }, "customizations": { "vscode": { "extensions": [ "eamodio.gitlens", "streetsidesoftware.code-spell-checker", - "ms-vscode.vscode-typescript-next" + "ms-vscode.vscode-typescript-next", + "dbaeumer.vscode-eslint" ] } } diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..17f62bb53 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,63 @@ +FROM debian:bullseye + +LABEL maintainer="bug@cassiopee.g-eau.fr" +LABEL version="3.0" + +ENV DEBIAN_FRONTEND noninteractive + +# base packages +RUN dpkg --add-architecture i386 \ + && apt-get update \ + && apt-get install -y \ + locales \ + curl \ + build-essential \ + wget \ + git \ + rsync + +# UTF-8 locale +RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \ + && locale-gen +ENV LANG en_US.UTF-8 +ENV LANGUAGE en_US:en +ENV LC_ALL en_US.UTF-8 + +# LateX +RUN apt-get install -y texlive-lang-french texlive-xetex + +# setup nodejs repository (source.list) and install nodejs +RUN curl -sL https://deb.nodesource.com/setup_18.x | bash - \ + && apt-get update \ + && apt-get install -y \ + nodejs + +# python3 +RUN apt-get install -y \ + python3 \ + python3-pip \ + python3-setuptools \ + && python3 -m pip install mkdocs python-markdown-math mkdocs-material + +# chromium and procps (e2e) +RUN apt-get install -y chromium chromium-driver procps + +# pandoc & LaTeX for PDF doc +RUN apt-get install -y \ + pandoc \ + texlive \ + latexmk \ + texlive-latex-extra \ + texlive-bibtex-extra + +# wine +RUN wget -nc https://dl.winehq.org/wine-builds/winehq.key \ + && apt-key add winehq.key \ + && echo "deb https://dl.winehq.org/wine-builds/debian/ bullseye main" > /etc/apt/sources.list.d/winehq.list \ + && dpkg --add-architecture i386 \ + && apt-get update \ + && apt-get install -y --install-recommends winehq-stable + +WORKDIR /build + +ENV SHELL /bin/bash -- GitLab