From 53da499d5b337ebd52a7d6ba5cb1bfc81550d11c Mon Sep 17 00:00:00 2001 From: Olivier Benz Date: Thu, 1 Feb 2024 08:57:59 +0100 Subject: [PATCH 1/4] Add Dev Container Configuration Files --- .Rbuildignore | 1 + .devcontainer/.gitignore | 23 ++++ .devcontainer/Dockerfile | 109 ++++++++++++++++++ .devcontainer/LICENSE | 22 ++++ .devcontainer/README.md | 17 +++ .devcontainer/conf/shell/etc/skel/.profile | 30 +++++ .../conf/shell/var/tmp/snippets/rc.sh | 13 +++ .devcontainer/devcontainer.json | 79 +++++++++++++ .../scripts/usr/local/bin/onCreateCommand.sh | 51 ++++++++ .../usr/local/bin/postCreateCommand.sh | 8 ++ .../scripts/usr/local/bin/postStartCommand.sh | 17 +++ 11 files changed, 370 insertions(+) create mode 100644 .devcontainer/.gitignore create mode 100644 .devcontainer/Dockerfile create mode 100644 .devcontainer/LICENSE create mode 100644 .devcontainer/README.md create mode 100644 .devcontainer/conf/shell/etc/skel/.profile create mode 100644 .devcontainer/conf/shell/var/tmp/snippets/rc.sh create mode 100644 .devcontainer/devcontainer.json create mode 100755 .devcontainer/scripts/usr/local/bin/onCreateCommand.sh create mode 100755 .devcontainer/scripts/usr/local/bin/postCreateCommand.sh create mode 100755 .devcontainer/scripts/usr/local/bin/postStartCommand.sh diff --git a/.Rbuildignore b/.Rbuildignore index db3a9ba..6b87aa4 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -15,3 +15,4 @@ ^valgrind.dockerfile$ ^CRAN-SUBMISSION$ ^cran-comments\.md$ +^\.devcontainer$ diff --git a/.devcontainer/.gitignore b/.devcontainer/.gitignore new file mode 100644 index 0000000..7d673d4 --- /dev/null +++ b/.devcontainer/.gitignore @@ -0,0 +1,23 @@ +* + +!/conf/ +!/conf/shell/ +!/conf/shell/etc/ +!/conf/shell/etc/skel/ +!/conf/shell/var/ +!/conf/shell/var/tmp/ +!/conf/shell/var/tmp/snippets/ +!/scripts/ +!/scripts/usr/ +!/scripts/usr/local/ +!/scripts/usr/local/bin/ + +!/conf/shell/etc/skel/.profile +!/conf/shell/var/tmp/snippets/*.sh +!/scripts/usr/local/bin/*.sh + +!/.gitignore +!/devcontainer.json +!/Dockerfile +!/LICENSE +!/README.md diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile new file mode 100644 index 0000000..1a0a71b --- /dev/null +++ b/.devcontainer/Dockerfile @@ -0,0 +1,109 @@ +ARG BUILD_ON_IMAGE=glcr.b-data.ch/r/tidyverse +ARG R_VERSION=latest + +FROM ${BUILD_ON_IMAGE}:${R_VERSION} as files + +RUN mkdir /files + +COPY conf/shell /files +COPY scripts /files + +## Ensure file modes are correct +RUN find /files -type d -exec chmod 755 {} \; \ + && find /files -type f -exec chmod 644 {} \; \ + && find /files/usr/local/bin -type f -exec chmod 755 {} \; \ + && cp -r /files/etc/skel/. /files/root \ + && bash -c 'rm -rf /files/root/{.bashrc,.profile}' \ + && chmod 700 /files/root + +FROM docker.io/koalaman/shellcheck:stable as sci + +FROM ${BUILD_ON_IMAGE}:${R_VERSION} + +ARG DEBIAN_FRONTEND=noninteractive + +ENV PARENT_IMAGE_CRAN=${CRAN} + +ARG BUILD_ON_IMAGE +ARG CRAN + +ARG CRAN_OVERRIDE=${CRAN} + +ENV PARENT_IMAGE=${BUILD_ON_IMAGE}:${R_VERSION} \ + CRAN=${CRAN_OVERRIDE:-$CRAN} \ + PARENT_IMAGE_BUILD_DATE=${BUILD_DATE} + +# hadolint ignore=DL3008,DL3015,SC2016 +RUN dpkgArch="$(dpkg --print-architecture)" \ + ## Ensure that common CA certificates + ## and OpenSSL libraries are up to date + && apt-get update \ + && apt-get -y install --only-upgrade \ + ca-certificates \ + openssl \ + ## Install pak + && pkgType="$(Rscript -e 'cat(.Platform$pkgType)')" \ + && os="$(Rscript -e 'cat(R.Version()$os)')" \ + && arch="$(Rscript -e 'cat(R.Version()$arch)')" \ + && install2.r -r "https://r-lib.github.io/p/pak/stable/$pkgType/$os/$arch" -e \ + pak \ + ## Install languageserver and decor + && install2.r -s -d TRUE -n "$(($(nproc)+1))" -e \ + languageserver \ + decor \ + ## Clean up + && rm -rf /tmp/* \ + /root/.cache \ + ## Install hadolint + && case "$dpkgArch" in \ + amd64) tarArch="x86_64" ;; \ + arm64) tarArch="arm64" ;; \ + *) echo "error: Architecture $dpkgArch unsupported"; exit 1 ;; \ + esac \ + && apiResponse="$(curl -sSL \ + https://api.github.com/repos/hadolint/hadolint/releases/latest)" \ + && downloadUrl="$(echo "$apiResponse" | grep -e \ + "browser_download_url.*Linux-$tarArch\"" | cut -d : -f 2,3 | tr -d \")" \ + && echo "$downloadUrl" | xargs curl -sSLo /usr/local/bin/hadolint \ + && chmod 755 /usr/local/bin/hadolint \ + ## Create backup of root directory + && cp -a /root /var/backups \ + ## Clean up + && rm -rf /var/lib/apt/lists/* + +## Update environment +ARG USE_ZSH_FOR_ROOT +ARG SET_LANG +ARG SET_TZ + +ENV LANG=${SET_LANG:-$LANG} \ + TZ=${SET_TZ:-$TZ} + + ## Change root's shell to ZSH +RUN if [ -n "$USE_ZSH_FOR_ROOT" ]; then \ + chsh -s /bin/zsh; \ + fi \ + ## Update timezone if needed + && if [ "$TZ" != "Etc/UTC" ]; then \ + echo "Setting TZ to $TZ"; \ + ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime \ + && echo "$TZ" > /etc/timezone; \ + fi \ + ## Add/Update locale if needed + && if [ "$LANG" != "en_US.UTF-8" ]; then \ + sed -i "s/# $LANG/$LANG/g" /etc/locale.gen; \ + locale-gen; \ + echo "Setting LANG to $LANG"; \ + update-locale --reset LANG="$LANG"; \ + fi \ + ## Update CRAN + && sed -i "s|$PARENT_IMAGE_CRAN|$CRAN|g" "$(R RHOME)/etc/Rprofile.site" + +## Unset environment variable BUILD_DATE +ENV BUILD_DATE= + +## Copy files as late as possible to avoid cache busting +COPY --from=files /files / + +## Copy shellcheck as late as possible to avoid cache busting +COPY --from=sci --chown=root:root /bin/shellcheck /usr/local/bin diff --git a/.devcontainer/LICENSE b/.devcontainer/LICENSE new file mode 100644 index 0000000..90a8259 --- /dev/null +++ b/.devcontainer/LICENSE @@ -0,0 +1,22 @@ +Copyright (c) 2023 b-data GmbH + +The code in this directory is not part of unigd (the software) and is +distributed under the terms of the MIT License: + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 0000000..55c10b7 --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,17 @@ +# Dev Containers + +For further information, see [Development Containers](https://containers.dev). + +## Usage + +For local/remote usage with VS Code, please follow the instructions at +[Developing inside a Container](https://code.visualstudio.com/docs/devcontainers/containers). + + +For use with Github Codespaces: Open in GitHub Codespaces + + +## License + +The code in this directory is not part of unigd (the software) and is +distributed under the terms of the [MIT License](LICENSE). diff --git a/.devcontainer/conf/shell/etc/skel/.profile b/.devcontainer/conf/shell/etc/skel/.profile new file mode 100644 index 0000000..6628368 --- /dev/null +++ b/.devcontainer/conf/shell/etc/skel/.profile @@ -0,0 +1,30 @@ +# ~/.profile: executed by the command interpreter for login shells. +# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login +# exists. +# see /usr/share/doc/bash/examples/startup-files for examples. +# the files are located in the bash-doc package. + +# the default umask is set in /etc/profile; for setting the umask +# for ssh logins, install and configure the libpam-umask package. +#umask 022 + +# if running bash +if [ -n "$BASH_VERSION" ]; then + # include .bashrc if it exists + if [ -f "$HOME/.bashrc" ]; then + . "$HOME/.bashrc" + fi +else + # if not running zsh + if [ -z "$ZSH_VERSION" ]; then + # set PATH so it includes user's private bin if it exists + if [ -d "$HOME/bin" ] ; then + PATH="$HOME/bin:$PATH" + fi + + # set PATH so it includes user's private bin if it exists + if [ -d "$HOME/.local/bin" ] ; then + PATH="$HOME/.local/bin:$PATH" + fi + fi +fi diff --git a/.devcontainer/conf/shell/var/tmp/snippets/rc.sh b/.devcontainer/conf/shell/var/tmp/snippets/rc.sh new file mode 100644 index 0000000..49fe8b2 --- /dev/null +++ b/.devcontainer/conf/shell/var/tmp/snippets/rc.sh @@ -0,0 +1,13 @@ + +# remove potentially appended $HOME/.local/bin from PATH +PATH="${PATH%:$HOME/.local/bin}" + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/bin" ] && [[ "$PATH" != *"$HOME/bin"* ]] ; then + PATH="$HOME/bin:$PATH" +fi + +# set PATH so it includes user's private bin if it exists +if [ -d "$HOME/.local/bin" ] && [[ "$PATH" != *"$HOME/.local/bin"* ]] ; then + PATH="$HOME/.local/bin:$PATH" +fi diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..a79d671 --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,79 @@ +{ + "name": "R latest", + "build": { + "dockerfile": "Dockerfile", + "args": { + "BUILD_ON_IMAGE": "glcr.b-data.ch/r/tidyverse", + "CRAN": "https://cloud.r-project.org", + "R_VERSION": "latest", + "USE_ZSH_FOR_ROOT": "unset-to-use-bash", + "SET_LANG": "en_US.UTF-8", + "SET_TZ": "Etc/UTC" + } + }, + + "onCreateCommand": "onCreateCommand.sh", + "postCreateCommand": "postCreateCommand.sh", + "postStartCommand": "postStartCommand.sh", + + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "configureZshAsDefaultShell": true, + "upgradePackages": false, + "username": "vscode", + "userUid": "automatic", + "userGid": "automatic" + }, + "ghcr.io/devcontainers/features/docker-outside-of-docker:1": { + "moby": false + }, + // A comma separated list of packages to install + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": "qpdf" + } + }, + + "customizations": { + "vscode": { + "extensions": [ + "DavidAnson.vscode-markdownlint", + "eamodio.gitlens@11.7.0", + "editorconfig.editorconfig", + "GitHub.vscode-pull-request-github", + "grapecity.gc-excelviewer", + "mhutchie.git-graph", + "mutantdino.resourcemonitor", + "redhat.vscode-yaml", + "REditorSupport.r", + "timonwong.shellcheck", + "exiasr.hadolint", + "ms-azuretools.vscode-docker", + "ms-vscode.cpptools" + ], + "settings": { + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "r.bracketedPaste": true, + "r.plot.useHttpgd": true, + "r.rterm.linux": "/usr/local/bin/radian", + "r.rterm.option": [ + "--no-save", + "--no-restore" + ], + "r.workspaceViewer.showObjectSize": true, + "resmon.show.battery": false, + "resmon.show.cpufreq": false + } + } + }, + + // Set 'remoteUser' to 'root' to connect as root instead. + "remoteUser": "vscode", + + "remoteEnv": { + // Pip: Install packages to the user site + "PIP_USER": "1", + // A comma separated list of packages to install + "R_PACKAGES": "fontquiver" + } +} diff --git a/.devcontainer/scripts/usr/local/bin/onCreateCommand.sh b/.devcontainer/scripts/usr/local/bin/onCreateCommand.sh new file mode 100755 index 0000000..e5230b9 --- /dev/null +++ b/.devcontainer/scripts/usr/local/bin/onCreateCommand.sh @@ -0,0 +1,51 @@ +#!/usr/bin/env bash +# Copyright (c) 2023 b-data GmbH. +# Distributed under the terms of the MIT License. + +set -e + +mkdir -p "$HOME/.local/bin" + +# Copy Bash-related files from root's backup directory +if [ "$(id -un)" == "root" ]; then + if [ ! -f /root/.bashrc ]; then + cp /var/backups/root/.bashrc /root; + fi + if [ ! -f /root/.profile ]; then + cp /var/backups/root/.profile /root; + fi +fi + +# Copy Zsh-related files and folders from the untouched home directory +if [ "$(id -un)" == "root" ]; then + if [ ! -d /root/.oh-my-zsh ]; then + cp -R /home/*/.oh-my-zsh /root; + fi + if [ ! -f /root/.zshrc ]; then + cp /home/*/.zshrc /root; + fi +else + if [ ! -d "$HOME/.oh-my-zsh" ]; then + sudo cp -R /root/.oh-my-zsh "$HOME"; + sudo chown -R "$(id -u)":"$(id -g)" "$HOME/.oh-my-zsh"; + fi + if [ ! -f "$HOME/.zshrc" ]; then + sudo cp /root/.zshrc "$HOME"; + sudo chown "$(id -u)":"$(id -g)" "$HOME/.zshrc"; + fi +fi + +# If existent, prepend the user's private bin to PATH +if ! grep -q "user's private bin" "$HOME/.bashrc"; then + cat "/var/tmp/snippets/rc.sh" >> "$HOME/.bashrc" +fi +if ! grep -q "user's private bin" "$HOME/.zshrc"; then + cat "/var/tmp/snippets/rc.sh" >> "$HOME/.zshrc" +fi + +# Enable Oh My Zsh plugins +sed -i "s/plugins=(git)/plugins=(docker docker-compose git git-lfs pip screen tmux vscode)/g" \ + "$HOME/.zshrc" + +# Remove old .zcompdump files +rm -f "$HOME"/.zcompdump* diff --git a/.devcontainer/scripts/usr/local/bin/postCreateCommand.sh b/.devcontainer/scripts/usr/local/bin/postCreateCommand.sh new file mode 100755 index 0000000..713bac1 --- /dev/null +++ b/.devcontainer/scripts/usr/local/bin/postCreateCommand.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# Copyright (c) 2023 b-data GmbH. +# Distributed under the terms of the MIT License. + +set -e + +# Change ownership of the workspaces folder +sudo chown "$(id -u)":"$(id -g)" /workspaces diff --git a/.devcontainer/scripts/usr/local/bin/postStartCommand.sh b/.devcontainer/scripts/usr/local/bin/postStartCommand.sh new file mode 100755 index 0000000..4eec45a --- /dev/null +++ b/.devcontainer/scripts/usr/local/bin/postStartCommand.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash +# Copyright (c) 2023 b-data GmbH. +# Distributed under the terms of the MIT License. + +set -e + +# Create R user library +mkdir -p "$(Rscript -e "cat(Sys.getenv('R_LIBS_USER'))")" + +# Install packages stated in environment variable R_PACKAGES +if [ -n "$R_PACKAGES" ]; then + R -q -e "pak::pak(trimws(unlist(strsplit('$R_PACKAGES', ',')))); \ + pak::cache_clean()" +fi + +# Install required (hard) dependencies for the current package +R -q -e "pak::pak(dependencies = NA); pak::cache_clean()" From 08a680945c31bf4cd66fa5fbbcdfca6b35b3e412 Mon Sep 17 00:00:00 2001 From: Olivier Benz Date: Sun, 10 Mar 2024 14:44:43 +0100 Subject: [PATCH 2/4] Refactor 'R latest' Dev Container --- .devcontainer/.gitignore | 2 +- .devcontainer/{Dockerfile => R.Dockerfile} | 13 ++++++++----- .devcontainer/devcontainer.json | 5 +++-- 3 files changed, 12 insertions(+), 8 deletions(-) rename .devcontainer/{Dockerfile => R.Dockerfile} (95%) diff --git a/.devcontainer/.gitignore b/.devcontainer/.gitignore index 7d673d4..ba48761 100644 --- a/.devcontainer/.gitignore +++ b/.devcontainer/.gitignore @@ -18,6 +18,6 @@ !/.gitignore !/devcontainer.json -!/Dockerfile +!/R.Dockerfile !/LICENSE !/README.md diff --git a/.devcontainer/Dockerfile b/.devcontainer/R.Dockerfile similarity index 95% rename from .devcontainer/Dockerfile rename to .devcontainer/R.Dockerfile index 1a0a71b..30af80e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/R.Dockerfile @@ -1,6 +1,8 @@ ARG BUILD_ON_IMAGE=glcr.b-data.ch/r/tidyverse ARG R_VERSION=latest +FROM docker.io/koalaman/shellcheck:stable as sci + FROM ${BUILD_ON_IMAGE}:${R_VERSION} as files RUN mkdir /files @@ -8,7 +10,7 @@ RUN mkdir /files COPY conf/shell /files COPY scripts /files -## Ensure file modes are correct + ## Ensure file modes are correct RUN find /files -type d -exec chmod 755 {} \; \ && find /files -type f -exec chmod 644 {} \; \ && find /files/usr/local/bin -type f -exec chmod 755 {} \; \ @@ -16,8 +18,6 @@ RUN find /files -type d -exec chmod 755 {} \; \ && bash -c 'rm -rf /files/root/{.bashrc,.profile}' \ && chmod 700 /files/root -FROM docker.io/koalaman/shellcheck:stable as sci - FROM ${BUILD_ON_IMAGE}:${R_VERSION} ARG DEBIAN_FRONTEND=noninteractive @@ -33,6 +33,9 @@ ENV PARENT_IMAGE=${BUILD_ON_IMAGE}:${R_VERSION} \ CRAN=${CRAN_OVERRIDE:-$CRAN} \ PARENT_IMAGE_BUILD_DATE=${BUILD_DATE} +# Dev Container +ARG NCPUS + # hadolint ignore=DL3008,DL3015,SC2016 RUN dpkgArch="$(dpkg --print-architecture)" \ ## Ensure that common CA certificates @@ -48,7 +51,7 @@ RUN dpkgArch="$(dpkg --print-architecture)" \ && install2.r -r "https://r-lib.github.io/p/pak/stable/$pkgType/$os/$arch" -e \ pak \ ## Install languageserver and decor - && install2.r -s -d TRUE -n "$(($(nproc)+1))" -e \ + && install2.r -s -d TRUE -n "${NCPUS:-$(($(nproc)+1))}" -e \ languageserver \ decor \ ## Clean up @@ -71,7 +74,7 @@ RUN dpkgArch="$(dpkg --print-architecture)" \ ## Clean up && rm -rf /var/lib/apt/lists/* -## Update environment +# Update environment ARG USE_ZSH_FOR_ROOT ARG SET_LANG ARG SET_TZ diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index a79d671..e7cb82e 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,11 +1,12 @@ { - "name": "R latest", + "name": "R latest (Debian stable)", "build": { "dockerfile": "Dockerfile", "args": { "BUILD_ON_IMAGE": "glcr.b-data.ch/r/tidyverse", "CRAN": "https://cloud.r-project.org", "R_VERSION": "latest", + // "NCPUS": "1", "USE_ZSH_FOR_ROOT": "unset-to-use-bash", "SET_LANG": "en_US.UTF-8", "SET_TZ": "Etc/UTC" @@ -29,7 +30,7 @@ }, // A comma separated list of packages to install "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { - "packages": "qpdf" + "packages": "libcairo2-dev,libtiff-dev,qpdf" } }, From 846012f598cbd6614e2f2324231a6bde52a81359 Mon Sep 17 00:00:00 2001 From: Olivier Benz Date: Sun, 10 Mar 2024 15:41:15 +0100 Subject: [PATCH 3/4] Add 'R devel' Dev Containers - Including those with Clang using -stdlib=libc++ --- .devcontainer/.gitignore | 3 + .devcontainer/Debian.Dockerfile | 460 ++++++++++++++++++ .../devcontainer.json | 80 +++ .../debian-stable-clang/devcontainer.json | 79 +++ .../debian-stable-gcc/devcontainer.json | 78 +++ .../devcontainer.json | 80 +++ .../debian-testing-clang/devcontainer.json | 79 +++ .../debian-testing-gcc/devcontainer.json | 78 +++ .../devcontainer.json | 82 ++++ .../devcontainer.json | 81 +++ .../devcontainer.json | 81 +++ .../debian-unstable-clang/devcontainer.json | 80 +++ .../debian-unstable-gcc/devcontainer.json | 79 +++ 13 files changed, 1340 insertions(+) create mode 100644 .devcontainer/Debian.Dockerfile create mode 100644 .devcontainer/debian-stable-clang-libcpp/devcontainer.json create mode 100644 .devcontainer/debian-stable-clang/devcontainer.json create mode 100644 .devcontainer/debian-stable-gcc/devcontainer.json create mode 100644 .devcontainer/debian-testing-clang-libcpp/devcontainer.json create mode 100644 .devcontainer/debian-testing-clang/devcontainer.json create mode 100644 .devcontainer/debian-testing-gcc/devcontainer.json create mode 100644 .devcontainer/debian-unstable-clang-18-libcpp/devcontainer.json create mode 100644 .devcontainer/debian-unstable-clang-18/devcontainer.json create mode 100644 .devcontainer/debian-unstable-clang-libcpp/devcontainer.json create mode 100644 .devcontainer/debian-unstable-clang/devcontainer.json create mode 100644 .devcontainer/debian-unstable-gcc/devcontainer.json diff --git a/.devcontainer/.gitignore b/.devcontainer/.gitignore index ba48761..63f880a 100644 --- a/.devcontainer/.gitignore +++ b/.devcontainer/.gitignore @@ -7,6 +7,7 @@ !/conf/shell/var/ !/conf/shell/var/tmp/ !/conf/shell/var/tmp/snippets/ +!/debian-*/ !/scripts/ !/scripts/usr/ !/scripts/usr/local/ @@ -14,10 +15,12 @@ !/conf/shell/etc/skel/.profile !/conf/shell/var/tmp/snippets/*.sh +!/debian-*/devcontainer.json !/scripts/usr/local/bin/*.sh !/.gitignore !/devcontainer.json +!/Debian.Dockerfile !/R.Dockerfile !/LICENSE !/README.md diff --git a/.devcontainer/Debian.Dockerfile b/.devcontainer/Debian.Dockerfile new file mode 100644 index 0000000..e8c0cd5 --- /dev/null +++ b/.devcontainer/Debian.Dockerfile @@ -0,0 +1,460 @@ +ARG BASE_IMAGE=debian +ARG BASE_IMAGE_TAG=latest +ARG R_VERSION=latest + +FROM docker.io/koalaman/shellcheck:stable as sci + +FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG} as files + +RUN mkdir /files + +COPY conf/shell /files +COPY scripts /files + + ## Ensure file modes are correct +RUN find /files -type d -exec chmod 755 {} \; \ + && find /files -type f -exec chmod 644 {} \; \ + && find /files/usr/local/bin -type f -exec chmod 755 {} \; \ + && cp -r /files/etc/skel/. /files/root \ + && bash -c 'rm -rf /files/root/{.bashrc,.profile}' \ + && chmod 700 /files/root + +# Build R according to https://github.com/b-data/rsi +FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG} as rsi + +ARG DEBIAN_FRONTEND=noninteractive + +ARG COMPILER +ARG COMPILER_VERSION +ARG CXX_STDLIB + +# hadolint ignore=DL3008,SC2086 +RUN CXX_STDLIB_VERSION=${CXX_STDLIB:+$COMPILER_VERSION} \ + && apt-get update \ + && apt-get install -y --no-install-recommends \ + dpkg-dev \ + "${CXX_STDLIB:-g++}${CXX_STDLIB_VERSION:+-}${CXX_STDLIB_VERSION}${CXX_STDLIB:+-dev}" \ + libc6-dev \ + make \ + ca-certificates \ + "${COMPILER:-gcc}${COMPILER_VERSION:+-}${COMPILER_VERSION}" \ + gfortran \ + libbz2-* \ + '^libcurl[3|4]$' \ + libicu* \ + '^libjpeg.*-turbo.*' \ + liblzma* \ + "${BLAS:-liblapack-dev}" \ + libpangocairo-* \ + libpaper-utils \ + '^libpcre[2|3]*' \ + libpng-dev \ + libreadline-dev \ + '^libtiff[5|6]$' \ + unzip \ + zip \ + zlib1g \ + && BUILDDEPS="curl \ + default-jdk \ + #libbz2-dev \ + libcairo2-dev \ + libcurl4-openssl-dev \ + libpango1.0-dev \ + libjpeg-dev \ + libicu-dev \ + #libpcre2-dev \ + #libpng-dev \ + #libreadline-dev \ + libtiff-dev \ + #liblzma-dev \ + libx11-dev \ + libxt-dev \ + perl \ + rsync \ + subversion \ + tcl-dev \ + tk-dev \ + texinfo \ + texlive-extra-utils \ + texlive-fonts-recommended \ + texlive-fonts-extra \ + texlive-latex-recommended \ + texlive-latex-extra \ + x11proto-core-dev \ + xauth \ + xfonts-base \ + xvfb \ + wget \ + zlib1g-dev" \ + && apt-get install -y --no-install-recommends $BUILDDEPS + +ARG R_VERSION +ARG CONFIG_ARGS="--enable-R-shlib \ + --enable-memory-profiling \ + --with-readline \ + --with-blas \ + --with-lapack \ + --with-tcltk \ + --with-recommended-packages" + +ARG PREFIX=/usr/local + +# hadolint ignore=DL3003,DL3008,SC2034 +RUN if [ "$R_VERSION" = "devel" ]; then \ + R_SRC="base-prerelease/R-devel.tar.gz"; \ + elif [ "$R_VERSION" = "patched" ]; then \ + R_SRC="base-prerelease/R-latest.tar.gz"; \ + elif [ "$R_VERSION" = "latest" ]; then \ + R_SRC="base/R-latest.tar.gz"; \ + else \ + R_SRC="base/R-${R_VERSION%%.*}/R-${R_VERSION}.tar.gz"; \ + fi \ + && cd /tmp \ + && wget --progress=dot:mega https://cran.r-project.org/src/${R_SRC} -O "R.tar.gz" \ + && tar zxf R.tar.gz --no-same-owner \ + && cd R-* \ + && export ${COMPILER:+CC="${COMPILER}${COMPILER_VERSION:+-}${COMPILER_VERSION}"} \ + && export ${COMPILER:+CXX="${COMPILER}++${COMPILER_VERSION:+-}${COMPILER_VERSION}"} \ + && export ${CXX_STDLIB:+CXX="$CXX -stdlib=${CXX_STDLIB}"} \ + && R_PAPERSIZE=letter \ + && R_BROWSER=xdg-open \ + && PAGER=/usr/bin/pager \ + && PERL=/usr/bin/perl \ + && R_UNZIPCMD=/usr/bin/unzip \ + && R_ZIPCMD=/usr/bin/zip \ + && R_PRINTCMD=/usr/bin/lpr \ + && LIBnn=lib \ + && AWK=/usr/bin/awk \ + && CFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g" \ + && CXXFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g" \ + && ./configure ${CONFIG_ARGS} --prefix=${PREFIX} \ + && make \ + && make install-strip \ + && echo "_R_SHLIB_STRIP_=true" >> ${PREFIX}/lib/R/etc/Renviron.site + +FROM ${BASE_IMAGE}:${BASE_IMAGE_TAG} + +ARG DEBIAN_FRONTEND=noninteractive + +ARG BASE_IMAGE +ARG BASE_IMAGE_TAG +ARG BLAS=libopenblas-dev +ARG COMPILER +ARG COMPILER_VERSION +ARG CXX_STDLIB +ARG CRAN + +ENV BASE_IMAGE=${BASE_IMAGE}:${BASE_IMAGE_TAG} \ + CRAN=${CRAN} + +ENV LANG=en_US.UTF-8 \ + TERM=xterm \ + TZ=Etc/UTC + +# Setup according to +# https://github.com/b-data/r-docker-stack/blob/main/ver/latest.Dockerfile +COPY --from=rsi /usr/local /usr/local + +# hadolint ignore=DL3008 +RUN apt-get update \ + ## Copy script checkbashisms from package devscripts + && apt-get install -y --no-install-recommends devscripts \ + && cp -a /usr/bin/checkbashisms /usr/local/bin/checkbashisms \ + && apt-get remove -y --purge devscripts \ + && apt-get autoremove -y \ + ## Install R runtime dependencies + && CXX_STDLIB_VERSION=${CXX_STDLIB:+$COMPILER_VERSION} \ + && apt-get install -y --no-install-recommends \ + dpkg-dev \ + "${CXX_STDLIB:-g++}${CXX_STDLIB_VERSION:+-}${CXX_STDLIB_VERSION}${CXX_STDLIB:+-dev}" \ + libc6-dev \ + make \ + ca-certificates \ + "${COMPILER:-gcc}${COMPILER_VERSION:+-}${COMPILER_VERSION}" \ + gfortran \ + "${CXX_STDLIB}${CXX_STDLIB:+abi}${CXX_STDLIB_VERSION:+-}${CXX_STDLIB_VERSION}${CXX_STDLIB:+-dev}" \ + libbz2-dev \ + '^libcurl[3|4]$' \ + libicu-dev \ + '^libjpeg.*-turbo.*-dev$' \ + liblapack-dev \ + liblzma-dev \ + ${BLAS} \ + libpangocairo-1.0-0 \ + libpaper-utils \ + '^libpcre[2|3]-dev$' \ + libpng-dev \ + libreadline-dev \ + '^libtiff[5|6]$' \ + pkg-config \ + unzip \ + zip \ + zlib1g \ + ## Additional packages + && apt-get install -y --no-install-recommends \ + bash-completion \ + file \ + gsfonts \ + locales \ + tzdata \ + ## Misc packages (Debian unstable) + libdeflate-dev \ + libtirpc-dev \ + ## Switch BLAS/LAPACK (manual mode) + && if [ "${BLAS}" = "libopenblas-dev" ]; then \ + update-alternatives --set "libblas.so.3-$(uname -m)-linux-gnu" \ + "/usr/lib/$(uname -m)-linux-gnu/openblas-pthread/libblas.so.3"; \ + update-alternatives --set "liblapack.so.3-$(uname -m)-linux-gnu" \ + "/usr/lib/$(uname -m)-linux-gnu/openblas-pthread/liblapack.so.3"; \ + fi \ + ## Update locale + && sed -i "s/# $LANG/$LANG/g" /etc/locale.gen \ + && locale-gen \ + && update-locale LANG=$LANG \ + ## Add directory for site-library + && RLS="$(Rscript -e "cat(Sys.getenv('R_LIBS_SITE'))")" \ + && mkdir -p "${RLS}" \ + ## Set configured CRAN mirror + && echo "options(repos = c(CRAN='$CRAN'), download.file.method = 'libcurl')" >> "$(R RHOME)/etc/Rprofile.site" \ + ## Use littler installation scripts + && Rscript -e "install.packages(c('littler', 'docopt'), repos = '$CRAN')" \ + && ln -s "${RLS}/littler/examples/install2.r" /usr/local/bin/install2.r \ + && ln -s "${RLS}/littler/examples/installGithub.r" /usr/local/bin/installGithub.r \ + && ln -s "${RLS}/littler/bin/r" /usr/local/bin/r \ + ## Clean up + && rm -rf /tmp/* \ + && rm -rf /var/lib/apt/lists/* + +# Setup according to +# https://github.com/b-data/r-docker-stack/blob/main/base/latest.Dockerfile + +## Installing V8 on Linux, the alternative way +## https://ropensci.org/blog/2020/11/12/installing-v8 +ENV DOWNLOAD_STATIC_LIBV8=1 + +## Disable prompt to install miniconda +ENV RETICULATE_MINICONDA_ENABLED=0 + +# hadolint ignore=DL3008 +RUN apt-get update \ + && apt-get -y install --no-install-recommends \ + bash-completion \ + curl \ + file \ + fontconfig \ + gnupg \ + htop \ + info \ + jq \ + libclang-dev \ + man-db \ + nano \ + ncdu \ + procps \ + psmisc \ + screen \ + sudo \ + swig \ + tmux \ + vim-tiny \ + wget \ + zsh \ + ## Install Git + git \ + ## Git: Additional runtime recommendations + less \ + ssh-client \ + ## Install Git LFS + git-lfs \ + ## Install pandoc + pandoc \ + ## Python: Additional dev dependencies + && if [ -z "$PYTHON_VERSION" ]; then \ + apt-get -y install --no-install-recommends \ + python3-dev \ + ## Install Python package installer + ## (dep: python3-distutils, python3-setuptools and python3-wheel) + python3-pip \ + ## Install venv module for python3 + python3-venv; \ + ## make some useful symlinks that are expected to exist + ## ("/usr/bin/python" and friends) + for src in pydoc3 python3 python3-config; do \ + dst="$(echo "$src" | tr -d 3)"; \ + if [ -s "/usr/bin/$src" ] && [ ! -e "/usr/bin/$dst" ]; then \ + ln -svT "$src" "/usr/bin/$dst"; \ + fi \ + done; \ + else \ + ## Force update pip, setuptools and wheel + curl -sLO https://bootstrap.pypa.io/get-pip.py; \ + python get-pip.py \ + pip \ + setuptools \ + wheel; \ + rm get-pip.py; \ + fi \ + ## Git: Set default branch name to main + && git config --system init.defaultBranch main \ + ## Git: Store passwords for one hour in memory + && git config --system credential.helper "cache --timeout=3600" \ + ## Git: Merge the default branch from the default remote when "git pull" is run + && git config --system pull.rebase false \ + ## Clean up + && rm -rf /tmp/* \ + && rm -rf /var/lib/apt/lists/* + +# hadolint ignore=DL3008,DL3013 +RUN apt-get update \ + && apt-get -y install --no-install-recommends \ + ## Current ZeroMQ library for R pbdZMQ + libzmq3-dev \ + ## Required for R extension + libcairo2-dev \ + libcurl4-openssl-dev \ + libfontconfig1-dev \ + libssl-dev \ + libtiff-dev \ + libxml2-dev \ + ## Install radian + && export PIP_BREAK_SYSTEM_PACKAGES=1 \ + && pip install --no-cache-dir radian \ + ## Clean up + && rm -rf /tmp/* \ + && rm -rf /var/lib/apt/lists/* \ + /root/.cache + +# Dev Container +ARG NCPUS + +# hadolint ignore=DL3008,DL3015,SC2016 +RUN dpkgArch="$(dpkg --print-architecture)" \ + ## Ensure that common CA certificates + ## and OpenSSL libraries are up to date + && apt-get update \ + && apt-get -y install --only-upgrade \ + ca-certificates \ + openssl \ + ## Required for devtools + && apt-get -y install --no-install-recommends \ + libfribidi-dev \ + libgit2-dev \ + libharfbuzz-dev \ + ## Install pak + && pkgType="$(Rscript -e 'cat(.Platform$pkgType)')" \ + && os="$(Rscript -e 'cat(R.Version()$os)')" \ + && arch="$(Rscript -e 'cat(R.Version()$arch)')" \ + && install2.r -r "https://r-lib.github.io/p/pak/stable/$pkgType/$os/$arch" -e \ + pak \ + ## Install devtools, languageserver and decor + && install2.r -s -d TRUE -n "${NCPUS:-$(($(nproc)+1))}" -e \ + devtools \ + languageserver \ + decor \ + ## Clean up + && rm -rf /tmp/* \ + /root/.cache \ + ## Install hadolint + && case "$dpkgArch" in \ + amd64) tarArch="x86_64" ;; \ + arm64) tarArch="arm64" ;; \ + *) echo "error: Architecture $dpkgArch unsupported"; exit 1 ;; \ + esac \ + && apiResponse="$(curl -sSL \ + https://api.github.com/repos/hadolint/hadolint/releases/latest)" \ + && downloadUrl="$(echo "$apiResponse" | grep -e \ + "browser_download_url.*Linux-$tarArch\"" | cut -d : -f 2,3 | tr -d \")" \ + && echo "$downloadUrl" | xargs curl -sSLo /usr/local/bin/hadolint \ + && chmod 755 /usr/local/bin/hadolint \ + ## Create backup of root directory + && cp -a /root /var/backups \ + ## Clean up + && rm -rf /var/lib/apt/lists/* + +## Install common utils +## https://github.com/devcontainers/features/blob/main/src/common-utils/main.sh +ARG INSTALL_COMMON_UTILS + +# hadolint ignore=DL3008 +RUN if [ "$INSTALL_COMMON_UTILS" = "true" ]; then \ + apt-get update; \ + apt-get -y install --no-install-recommends \ + apt-utils \ + openssh-client \ + gnupg2 \ + dirmngr \ + iproute2 \ + procps \ + lsof \ + htop \ + net-tools \ + psmisc \ + curl \ + tree \ + wget \ + rsync \ + ca-certificates \ + unzip \ + bzip2 \ + xz-utils \ + zip \ + nano \ + vim-tiny \ + less \ + jq \ + lsb-release \ + apt-transport-https \ + dialog \ + libc6 \ + libgcc1 \ + libkrb5-3 \ + libgssapi-krb5-2 \ + libicu[0-9][0-9] \ + liblttng-ust[0-9] \ + libstdc++6 \ + zlib1g \ + locales \ + sudo \ + ncdu \ + man-db \ + strace \ + manpages \ + manpages-dev \ + init-system-helpers; \ + fi \ + ## Clean up + && rm -rf /var/lib/apt/lists/* + +ENV PACKAGES_ALREADY_INSTALLED=${INSTALL_COMMON_UTILS} + +# Update environment +ARG USE_ZSH_FOR_ROOT +ARG SET_LANG +ARG SET_TZ + +ENV LANG=${SET_LANG:-$LANG} \ + TZ=${SET_TZ:-$TZ} + + ## Change root's shell to ZSH +RUN if [ -n "$USE_ZSH_FOR_ROOT" ]; then \ + chsh -s /bin/zsh; \ + fi \ + ## Update timezone if needed + && if [ "$TZ" != "Etc/UTC" ]; then \ + echo "Setting TZ to $TZ"; \ + ln -snf "/usr/share/zoneinfo/$TZ" /etc/localtime \ + && echo "$TZ" > /etc/timezone; \ + fi \ + ## Add/Update locale if needed + && if [ "$LANG" != "en_US.UTF-8" ]; then \ + sed -i "s/# $LANG/$LANG/g" /etc/locale.gen; \ + locale-gen; \ + echo "Setting LANG to $LANG"; \ + update-locale --reset LANG="$LANG"; \ + fi + +## Copy files as late as possible to avoid cache busting +COPY --from=files /files / + +## Copy shellcheck as late as possible to avoid cache busting +COPY --from=sci --chown=root:root /bin/shellcheck /usr/local/bin diff --git a/.devcontainer/debian-stable-clang-libcpp/devcontainer.json b/.devcontainer/debian-stable-clang-libcpp/devcontainer.json new file mode 100644 index 0000000..dc69ed4 --- /dev/null +++ b/.devcontainer/debian-stable-clang-libcpp/devcontainer.json @@ -0,0 +1,80 @@ +{ + "name": "R devel (Debian stable, Clang, libc++)", + "build": { + "dockerfile": "../Debian.Dockerfile", + "context": "..", + "args": { + "BASE_IMAGE": "debian", + "BASE_IMAGE_TAG": "stable", + "COMPILER": "clang", + "CXX_STDLIB": "libc++", + "CRAN": "https://cloud.r-project.org", + "R_VERSION": "devel", + // "NCPUS": "1", + "USE_ZSH_FOR_ROOT": "unset-to-use-bash", + "SET_LANG": "en_US.UTF-8", + "SET_TZ": "Etc/UTC" + } + }, + + "onCreateCommand": "onCreateCommand.sh", + "postCreateCommand": "postCreateCommand.sh", + "postStartCommand": "postStartCommand.sh", + + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "configureZshAsDefaultShell": true, + "upgradePackages": false, + "username": "vscode", + "userUid": "automatic", + "userGid": "automatic" + }, + // A comma separated list of packages to install + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": "qpdf" + } + }, + + "customizations": { + "vscode": { + "extensions": [ + "DavidAnson.vscode-markdownlint", + "eamodio.gitlens@11.7.0", + "editorconfig.editorconfig", + "GitHub.vscode-pull-request-github", + "grapecity.gc-excelviewer", + "mhutchie.git-graph", + "mutantdino.resourcemonitor", + "redhat.vscode-yaml", + "REditorSupport.r", + "timonwong.shellcheck", + "exiasr.hadolint", + "ms-vscode.cpptools" + ], + "settings": { + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "r.bracketedPaste": true, + "r.plot.useHttpgd": true, + "r.rterm.linux": "/usr/local/bin/radian", + "r.rterm.option": [ + "--no-save", + "--no-restore" + ], + "r.workspaceViewer.showObjectSize": true, + "resmon.show.battery": false, + "resmon.show.cpufreq": false + } + } + }, + + // Set 'remoteUser' to 'root' to connect as root instead. + "remoteUser": "vscode", + + "remoteEnv": { + // Pip: Install packages to the user site + "PIP_USER": "1", + // A comma separated list of packages to install + "R_PACKAGES": "fontquiver" + } +} diff --git a/.devcontainer/debian-stable-clang/devcontainer.json b/.devcontainer/debian-stable-clang/devcontainer.json new file mode 100644 index 0000000..28e09a1 --- /dev/null +++ b/.devcontainer/debian-stable-clang/devcontainer.json @@ -0,0 +1,79 @@ +{ + "name": "R devel (Debian stable, Clang)", + "build": { + "dockerfile": "../Debian.Dockerfile", + "context": "..", + "args": { + "BASE_IMAGE": "debian", + "BASE_IMAGE_TAG": "stable", + "COMPILER": "clang", + "CRAN": "https://cloud.r-project.org", + "R_VERSION": "devel", + // "NCPUS": "1", + "USE_ZSH_FOR_ROOT": "unset-to-use-bash", + "SET_LANG": "en_US.UTF-8", + "SET_TZ": "Etc/UTC" + } + }, + + "onCreateCommand": "onCreateCommand.sh", + "postCreateCommand": "postCreateCommand.sh", + "postStartCommand": "postStartCommand.sh", + + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "configureZshAsDefaultShell": true, + "upgradePackages": false, + "username": "vscode", + "userUid": "automatic", + "userGid": "automatic" + }, + // A comma separated list of packages to install + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": "qpdf" + } + }, + + "customizations": { + "vscode": { + "extensions": [ + "DavidAnson.vscode-markdownlint", + "eamodio.gitlens@11.7.0", + "editorconfig.editorconfig", + "GitHub.vscode-pull-request-github", + "grapecity.gc-excelviewer", + "mhutchie.git-graph", + "mutantdino.resourcemonitor", + "redhat.vscode-yaml", + "REditorSupport.r", + "timonwong.shellcheck", + "exiasr.hadolint", + "ms-vscode.cpptools" + ], + "settings": { + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "r.bracketedPaste": true, + "r.plot.useHttpgd": true, + "r.rterm.linux": "/usr/local/bin/radian", + "r.rterm.option": [ + "--no-save", + "--no-restore" + ], + "r.workspaceViewer.showObjectSize": true, + "resmon.show.battery": false, + "resmon.show.cpufreq": false + } + } + }, + + // Set 'remoteUser' to 'root' to connect as root instead. + "remoteUser": "vscode", + + "remoteEnv": { + // Pip: Install packages to the user site + "PIP_USER": "1", + // A comma separated list of packages to install + "R_PACKAGES": "fontquiver" + } +} diff --git a/.devcontainer/debian-stable-gcc/devcontainer.json b/.devcontainer/debian-stable-gcc/devcontainer.json new file mode 100644 index 0000000..ff22db8 --- /dev/null +++ b/.devcontainer/debian-stable-gcc/devcontainer.json @@ -0,0 +1,78 @@ +{ + "name": "R devel (Debian stable, GCC)", + "build": { + "dockerfile": "../Debian.Dockerfile", + "context": "..", + "args": { + "BASE_IMAGE": "debian", + "BASE_IMAGE_TAG": "stable", + "CRAN": "https://cloud.r-project.org", + "R_VERSION": "devel", + // "NCPUS": "1", + "USE_ZSH_FOR_ROOT": "unset-to-use-bash", + "SET_LANG": "en_US.UTF-8", + "SET_TZ": "Etc/UTC" + } + }, + + "onCreateCommand": "onCreateCommand.sh", + "postCreateCommand": "postCreateCommand.sh", + "postStartCommand": "postStartCommand.sh", + + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "configureZshAsDefaultShell": true, + "upgradePackages": false, + "username": "vscode", + "userUid": "automatic", + "userGid": "automatic" + }, + // A comma separated list of packages to install + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": "qpdf" + } + }, + + "customizations": { + "vscode": { + "extensions": [ + "DavidAnson.vscode-markdownlint", + "eamodio.gitlens@11.7.0", + "editorconfig.editorconfig", + "GitHub.vscode-pull-request-github", + "grapecity.gc-excelviewer", + "mhutchie.git-graph", + "mutantdino.resourcemonitor", + "redhat.vscode-yaml", + "REditorSupport.r", + "timonwong.shellcheck", + "exiasr.hadolint", + "ms-vscode.cpptools" + ], + "settings": { + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "r.bracketedPaste": true, + "r.plot.useHttpgd": true, + "r.rterm.linux": "/usr/local/bin/radian", + "r.rterm.option": [ + "--no-save", + "--no-restore" + ], + "r.workspaceViewer.showObjectSize": true, + "resmon.show.battery": false, + "resmon.show.cpufreq": false + } + } + }, + + // Set 'remoteUser' to 'root' to connect as root instead. + "remoteUser": "vscode", + + "remoteEnv": { + // Pip: Install packages to the user site + "PIP_USER": "1", + // A comma separated list of packages to install + "R_PACKAGES": "fontquiver" + } +} diff --git a/.devcontainer/debian-testing-clang-libcpp/devcontainer.json b/.devcontainer/debian-testing-clang-libcpp/devcontainer.json new file mode 100644 index 0000000..3019379 --- /dev/null +++ b/.devcontainer/debian-testing-clang-libcpp/devcontainer.json @@ -0,0 +1,80 @@ +{ + "name": "R devel (Debian testing, Clang, libc++)", + "build": { + "dockerfile": "../Debian.Dockerfile", + "context": "..", + "args": { + "BASE_IMAGE": "debian", + "BASE_IMAGE_TAG": "testing", + "COMPILER": "clang", + "CXX_STDLIB": "libc++", + "CRAN": "https://cloud.r-project.org", + "R_VERSION": "devel", + // "NCPUS": "1", + "USE_ZSH_FOR_ROOT": "unset-to-use-bash", + "SET_LANG": "en_US.UTF-8", + "SET_TZ": "Etc/UTC" + } + }, + + "onCreateCommand": "onCreateCommand.sh", + "postCreateCommand": "postCreateCommand.sh", + "postStartCommand": "postStartCommand.sh", + + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "configureZshAsDefaultShell": true, + "upgradePackages": false, + "username": "vscode", + "userUid": "automatic", + "userGid": "automatic" + }, + // A comma separated list of packages to install + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": "qpdf" + } + }, + + "customizations": { + "vscode": { + "extensions": [ + "DavidAnson.vscode-markdownlint", + "eamodio.gitlens@11.7.0", + "editorconfig.editorconfig", + "GitHub.vscode-pull-request-github", + "grapecity.gc-excelviewer", + "mhutchie.git-graph", + "mutantdino.resourcemonitor", + "redhat.vscode-yaml", + "REditorSupport.r", + "timonwong.shellcheck", + "exiasr.hadolint", + "ms-vscode.cpptools" + ], + "settings": { + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "r.bracketedPaste": true, + "r.plot.useHttpgd": true, + "r.rterm.linux": "/usr/local/bin/radian", + "r.rterm.option": [ + "--no-save", + "--no-restore" + ], + "r.workspaceViewer.showObjectSize": true, + "resmon.show.battery": false, + "resmon.show.cpufreq": false + } + } + }, + + // Set 'remoteUser' to 'root' to connect as root instead. + "remoteUser": "vscode", + + "remoteEnv": { + // Pip: Install packages to the user site + "PIP_USER": "1", + // A comma separated list of packages to install + "R_PACKAGES": "fontquiver" + } +} diff --git a/.devcontainer/debian-testing-clang/devcontainer.json b/.devcontainer/debian-testing-clang/devcontainer.json new file mode 100644 index 0000000..387e16f --- /dev/null +++ b/.devcontainer/debian-testing-clang/devcontainer.json @@ -0,0 +1,79 @@ +{ + "name": "R devel (Debian testing, Clang)", + "build": { + "dockerfile": "../Debian.Dockerfile", + "context": "..", + "args": { + "BASE_IMAGE": "debian", + "BASE_IMAGE_TAG": "testing", + "COMPILER": "clang", + "CRAN": "https://cloud.r-project.org", + "R_VERSION": "devel", + // "NCPUS": "1", + "USE_ZSH_FOR_ROOT": "unset-to-use-bash", + "SET_LANG": "en_US.UTF-8", + "SET_TZ": "Etc/UTC" + } + }, + + "onCreateCommand": "onCreateCommand.sh", + "postCreateCommand": "postCreateCommand.sh", + "postStartCommand": "postStartCommand.sh", + + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "configureZshAsDefaultShell": true, + "upgradePackages": false, + "username": "vscode", + "userUid": "automatic", + "userGid": "automatic" + }, + // A comma separated list of packages to install + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": "qpdf" + } + }, + + "customizations": { + "vscode": { + "extensions": [ + "DavidAnson.vscode-markdownlint", + "eamodio.gitlens@11.7.0", + "editorconfig.editorconfig", + "GitHub.vscode-pull-request-github", + "grapecity.gc-excelviewer", + "mhutchie.git-graph", + "mutantdino.resourcemonitor", + "redhat.vscode-yaml", + "REditorSupport.r", + "timonwong.shellcheck", + "exiasr.hadolint", + "ms-vscode.cpptools" + ], + "settings": { + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "r.bracketedPaste": true, + "r.plot.useHttpgd": true, + "r.rterm.linux": "/usr/local/bin/radian", + "r.rterm.option": [ + "--no-save", + "--no-restore" + ], + "r.workspaceViewer.showObjectSize": true, + "resmon.show.battery": false, + "resmon.show.cpufreq": false + } + } + }, + + // Set 'remoteUser' to 'root' to connect as root instead. + "remoteUser": "vscode", + + "remoteEnv": { + // Pip: Install packages to the user site + "PIP_USER": "1", + // A comma separated list of packages to install + "R_PACKAGES": "fontquiver" + } +} diff --git a/.devcontainer/debian-testing-gcc/devcontainer.json b/.devcontainer/debian-testing-gcc/devcontainer.json new file mode 100644 index 0000000..8a93c4e --- /dev/null +++ b/.devcontainer/debian-testing-gcc/devcontainer.json @@ -0,0 +1,78 @@ +{ + "name": "R devel (Debian testing, GCC)", + "build": { + "dockerfile": "../Debian.Dockerfile", + "context": "..", + "args": { + "BASE_IMAGE": "debian", + "BASE_IMAGE_TAG": "testing", + "CRAN": "https://cloud.r-project.org", + "R_VERSION": "devel", + // "NCPUS": "1", + "USE_ZSH_FOR_ROOT": "unset-to-use-bash", + "SET_LANG": "en_US.UTF-8", + "SET_TZ": "Etc/UTC" + } + }, + + "onCreateCommand": "onCreateCommand.sh", + "postCreateCommand": "postCreateCommand.sh", + "postStartCommand": "postStartCommand.sh", + + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "configureZshAsDefaultShell": true, + "upgradePackages": false, + "username": "vscode", + "userUid": "automatic", + "userGid": "automatic" + }, + // A comma separated list of packages to install + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": "qpdf" + } + }, + + "customizations": { + "vscode": { + "extensions": [ + "DavidAnson.vscode-markdownlint", + "eamodio.gitlens@11.7.0", + "editorconfig.editorconfig", + "GitHub.vscode-pull-request-github", + "grapecity.gc-excelviewer", + "mhutchie.git-graph", + "mutantdino.resourcemonitor", + "redhat.vscode-yaml", + "REditorSupport.r", + "timonwong.shellcheck", + "exiasr.hadolint", + "ms-vscode.cpptools" + ], + "settings": { + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "r.bracketedPaste": true, + "r.plot.useHttpgd": true, + "r.rterm.linux": "/usr/local/bin/radian", + "r.rterm.option": [ + "--no-save", + "--no-restore" + ], + "r.workspaceViewer.showObjectSize": true, + "resmon.show.battery": false, + "resmon.show.cpufreq": false + } + } + }, + + // Set 'remoteUser' to 'root' to connect as root instead. + "remoteUser": "vscode", + + "remoteEnv": { + // Pip: Install packages to the user site + "PIP_USER": "1", + // A comma separated list of packages to install + "R_PACKAGES": "fontquiver" + } +} diff --git a/.devcontainer/debian-unstable-clang-18-libcpp/devcontainer.json b/.devcontainer/debian-unstable-clang-18-libcpp/devcontainer.json new file mode 100644 index 0000000..3714d55 --- /dev/null +++ b/.devcontainer/debian-unstable-clang-18-libcpp/devcontainer.json @@ -0,0 +1,82 @@ +{ + "name": "R devel (Debian unstable, Clang 18, libc++)", + "build": { + "dockerfile": "../Debian.Dockerfile", + "context": "..", + "args": { + "BASE_IMAGE": "debian", + "BASE_IMAGE_TAG": "unstable", + "COMPILER": "clang", + "COMPILER_VERSION": "18", + "CXX_STDLIB": "libc++", + "CRAN": "https://cloud.r-project.org", + "R_VERSION": "devel", + // "NCPUS": "1", + "INSTALL_COMMON_UTILS": "true", + "USE_ZSH_FOR_ROOT": "unset-to-use-bash", + "SET_LANG": "en_US.UTF-8", + "SET_TZ": "Etc/UTC" + } + }, + + "onCreateCommand": "onCreateCommand.sh", + "postCreateCommand": "postCreateCommand.sh", + "postStartCommand": "postStartCommand.sh", + + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "configureZshAsDefaultShell": true, + "upgradePackages": false, + "username": "vscode", + "userUid": "automatic", + "userGid": "automatic" + }, + // A comma separated list of packages to install + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": "qpdf" + } + }, + + "customizations": { + "vscode": { + "extensions": [ + "DavidAnson.vscode-markdownlint", + "eamodio.gitlens@11.7.0", + "editorconfig.editorconfig", + "GitHub.vscode-pull-request-github", + "grapecity.gc-excelviewer", + "mhutchie.git-graph", + "mutantdino.resourcemonitor", + "redhat.vscode-yaml", + "REditorSupport.r", + "timonwong.shellcheck", + "exiasr.hadolint", + "ms-vscode.cpptools" + ], + "settings": { + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "r.bracketedPaste": true, + "r.plot.useHttpgd": true, + "r.rterm.linux": "/usr/local/bin/radian", + "r.rterm.option": [ + "--no-save", + "--no-restore" + ], + "r.workspaceViewer.showObjectSize": true, + "resmon.show.battery": false, + "resmon.show.cpufreq": false + } + } + }, + + // Set 'remoteUser' to 'root' to connect as root instead. + "remoteUser": "vscode", + + "remoteEnv": { + // Pip: Install packages to the user site + "PIP_USER": "1", + // A comma separated list of packages to install + "R_PACKAGES": "fontquiver" + } +} diff --git a/.devcontainer/debian-unstable-clang-18/devcontainer.json b/.devcontainer/debian-unstable-clang-18/devcontainer.json new file mode 100644 index 0000000..3e0f6a1 --- /dev/null +++ b/.devcontainer/debian-unstable-clang-18/devcontainer.json @@ -0,0 +1,81 @@ +{ + "name": "R devel (Debian unstable, Clang 18)", + "build": { + "dockerfile": "../Debian.Dockerfile", + "context": "..", + "args": { + "BASE_IMAGE": "debian", + "BASE_IMAGE_TAG": "unstable", + "COMPILER": "clang", + "COMPILER_VERSION": "18", + "CRAN": "https://cloud.r-project.org", + "R_VERSION": "devel", + // "NCPUS": "1", + "INSTALL_COMMON_UTILS": "true", + "USE_ZSH_FOR_ROOT": "unset-to-use-bash", + "SET_LANG": "en_US.UTF-8", + "SET_TZ": "Etc/UTC" + } + }, + + "onCreateCommand": "onCreateCommand.sh", + "postCreateCommand": "postCreateCommand.sh", + "postStartCommand": "postStartCommand.sh", + + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "configureZshAsDefaultShell": true, + "upgradePackages": false, + "username": "vscode", + "userUid": "automatic", + "userGid": "automatic" + }, + // A comma separated list of packages to install + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": "qpdf" + } + }, + + "customizations": { + "vscode": { + "extensions": [ + "DavidAnson.vscode-markdownlint", + "eamodio.gitlens@11.7.0", + "editorconfig.editorconfig", + "GitHub.vscode-pull-request-github", + "grapecity.gc-excelviewer", + "mhutchie.git-graph", + "mutantdino.resourcemonitor", + "redhat.vscode-yaml", + "REditorSupport.r", + "timonwong.shellcheck", + "exiasr.hadolint", + "ms-vscode.cpptools" + ], + "settings": { + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "r.bracketedPaste": true, + "r.plot.useHttpgd": true, + "r.rterm.linux": "/usr/local/bin/radian", + "r.rterm.option": [ + "--no-save", + "--no-restore" + ], + "r.workspaceViewer.showObjectSize": true, + "resmon.show.battery": false, + "resmon.show.cpufreq": false + } + } + }, + + // Set 'remoteUser' to 'root' to connect as root instead. + "remoteUser": "vscode", + + "remoteEnv": { + // Pip: Install packages to the user site + "PIP_USER": "1", + // A comma separated list of packages to install + "R_PACKAGES": "fontquiver" + } +} diff --git a/.devcontainer/debian-unstable-clang-libcpp/devcontainer.json b/.devcontainer/debian-unstable-clang-libcpp/devcontainer.json new file mode 100644 index 0000000..9eb43c4 --- /dev/null +++ b/.devcontainer/debian-unstable-clang-libcpp/devcontainer.json @@ -0,0 +1,81 @@ +{ + "name": "R devel (Debian unstable, Clang, libc++)", + "build": { + "dockerfile": "../Debian.Dockerfile", + "context": "..", + "args": { + "BASE_IMAGE": "debian", + "BASE_IMAGE_TAG": "unstable", + "COMPILER": "clang", + "CXX_STDLIB": "libc++", + "CRAN": "https://cloud.r-project.org", + "R_VERSION": "devel", + // "NCPUS": "1", + "INSTALL_COMMON_UTILS": "true", + "USE_ZSH_FOR_ROOT": "unset-to-use-bash", + "SET_LANG": "en_US.UTF-8", + "SET_TZ": "Etc/UTC" + } + }, + + "onCreateCommand": "onCreateCommand.sh", + "postCreateCommand": "postCreateCommand.sh", + "postStartCommand": "postStartCommand.sh", + + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "configureZshAsDefaultShell": true, + "upgradePackages": false, + "username": "vscode", + "userUid": "automatic", + "userGid": "automatic" + }, + // A comma separated list of packages to install + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": "qpdf" + } + }, + + "customizations": { + "vscode": { + "extensions": [ + "DavidAnson.vscode-markdownlint", + "eamodio.gitlens@11.7.0", + "editorconfig.editorconfig", + "GitHub.vscode-pull-request-github", + "grapecity.gc-excelviewer", + "mhutchie.git-graph", + "mutantdino.resourcemonitor", + "redhat.vscode-yaml", + "REditorSupport.r", + "timonwong.shellcheck", + "exiasr.hadolint", + "ms-vscode.cpptools" + ], + "settings": { + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "r.bracketedPaste": true, + "r.plot.useHttpgd": true, + "r.rterm.linux": "/usr/local/bin/radian", + "r.rterm.option": [ + "--no-save", + "--no-restore" + ], + "r.workspaceViewer.showObjectSize": true, + "resmon.show.battery": false, + "resmon.show.cpufreq": false + } + } + }, + + // Set 'remoteUser' to 'root' to connect as root instead. + "remoteUser": "vscode", + + "remoteEnv": { + // Pip: Install packages to the user site + "PIP_USER": "1", + // A comma separated list of packages to install + "R_PACKAGES": "fontquiver" + } +} diff --git a/.devcontainer/debian-unstable-clang/devcontainer.json b/.devcontainer/debian-unstable-clang/devcontainer.json new file mode 100644 index 0000000..62e72c3 --- /dev/null +++ b/.devcontainer/debian-unstable-clang/devcontainer.json @@ -0,0 +1,80 @@ +{ + "name": "R devel (Debian unstable, Clang)", + "build": { + "dockerfile": "../Debian.Dockerfile", + "context": "..", + "args": { + "BASE_IMAGE": "debian", + "BASE_IMAGE_TAG": "unstable", + "COMPILER": "clang", + "CRAN": "https://cloud.r-project.org", + "R_VERSION": "devel", + // "NCPUS": "1", + "INSTALL_COMMON_UTILS": "true", + "USE_ZSH_FOR_ROOT": "unset-to-use-bash", + "SET_LANG": "en_US.UTF-8", + "SET_TZ": "Etc/UTC" + } + }, + + "onCreateCommand": "onCreateCommand.sh", + "postCreateCommand": "postCreateCommand.sh", + "postStartCommand": "postStartCommand.sh", + + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "configureZshAsDefaultShell": true, + "upgradePackages": false, + "username": "vscode", + "userUid": "automatic", + "userGid": "automatic" + }, + // A comma separated list of packages to install + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": "qpdf" + } + }, + + "customizations": { + "vscode": { + "extensions": [ + "DavidAnson.vscode-markdownlint", + "eamodio.gitlens@11.7.0", + "editorconfig.editorconfig", + "GitHub.vscode-pull-request-github", + "grapecity.gc-excelviewer", + "mhutchie.git-graph", + "mutantdino.resourcemonitor", + "redhat.vscode-yaml", + "REditorSupport.r", + "timonwong.shellcheck", + "exiasr.hadolint", + "ms-vscode.cpptools" + ], + "settings": { + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "r.bracketedPaste": true, + "r.plot.useHttpgd": true, + "r.rterm.linux": "/usr/local/bin/radian", + "r.rterm.option": [ + "--no-save", + "--no-restore" + ], + "r.workspaceViewer.showObjectSize": true, + "resmon.show.battery": false, + "resmon.show.cpufreq": false + } + } + }, + + // Set 'remoteUser' to 'root' to connect as root instead. + "remoteUser": "vscode", + + "remoteEnv": { + // Pip: Install packages to the user site + "PIP_USER": "1", + // A comma separated list of packages to install + "R_PACKAGES": "fontquiver" + } +} diff --git a/.devcontainer/debian-unstable-gcc/devcontainer.json b/.devcontainer/debian-unstable-gcc/devcontainer.json new file mode 100644 index 0000000..e17828d --- /dev/null +++ b/.devcontainer/debian-unstable-gcc/devcontainer.json @@ -0,0 +1,79 @@ +{ + "name": "R devel (Debian unstable, GCC)", + "build": { + "dockerfile": "../Debian.Dockerfile", + "context": "..", + "args": { + "BASE_IMAGE": "debian", + "BASE_IMAGE_TAG": "unstable", + "CRAN": "https://cloud.r-project.org", + "R_VERSION": "devel", + // "NCPUS": "1", + "INSTALL_COMMON_UTILS": "true", + "USE_ZSH_FOR_ROOT": "unset-to-use-bash", + "SET_LANG": "en_US.UTF-8", + "SET_TZ": "Etc/UTC" + } + }, + + "onCreateCommand": "onCreateCommand.sh", + "postCreateCommand": "postCreateCommand.sh", + "postStartCommand": "postStartCommand.sh", + + "features": { + "ghcr.io/devcontainers/features/common-utils:2": { + "configureZshAsDefaultShell": true, + "upgradePackages": false, + "username": "vscode", + "userUid": "automatic", + "userGid": "automatic" + }, + // A comma separated list of packages to install + "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { + "packages": "qpdf" + } + }, + + "customizations": { + "vscode": { + "extensions": [ + "DavidAnson.vscode-markdownlint", + "eamodio.gitlens@11.7.0", + "editorconfig.editorconfig", + "GitHub.vscode-pull-request-github", + "grapecity.gc-excelviewer", + "mhutchie.git-graph", + "mutantdino.resourcemonitor", + "redhat.vscode-yaml", + "REditorSupport.r", + "timonwong.shellcheck", + "exiasr.hadolint", + "ms-vscode.cpptools" + ], + "settings": { + "gitlens.showWelcomeOnInstall": false, + "gitlens.showWhatsNewAfterUpgrades": false, + "r.bracketedPaste": true, + "r.plot.useHttpgd": true, + "r.rterm.linux": "/usr/local/bin/radian", + "r.rterm.option": [ + "--no-save", + "--no-restore" + ], + "r.workspaceViewer.showObjectSize": true, + "resmon.show.battery": false, + "resmon.show.cpufreq": false + } + } + }, + + // Set 'remoteUser' to 'root' to connect as root instead. + "remoteUser": "vscode", + + "remoteEnv": { + // Pip: Install packages to the user site + "PIP_USER": "1", + // A comma separated list of packages to install + "R_PACKAGES": "fontquiver" + } +} From a6dbce30e2e1065b29050f59def331cef1b14158 Mon Sep 17 00:00:00 2001 From: Olivier Benz Date: Tue, 12 Mar 2024 15:36:38 +0100 Subject: [PATCH 4/4] Remove Dev Containers with Clang 18 - Set environment variable R_VERSION --- .devcontainer/Debian.Dockerfile | 3 + .../devcontainer.json | 82 ------------------- .../devcontainer.json | 81 ------------------ 3 files changed, 3 insertions(+), 163 deletions(-) delete mode 100644 .devcontainer/debian-unstable-clang-18-libcpp/devcontainer.json delete mode 100644 .devcontainer/debian-unstable-clang-18/devcontainer.json diff --git a/.devcontainer/Debian.Dockerfile b/.devcontainer/Debian.Dockerfile index e8c0cd5..ee40f08 100644 --- a/.devcontainer/Debian.Dockerfile +++ b/.devcontainer/Debian.Dockerfile @@ -142,9 +142,11 @@ ARG BLAS=libopenblas-dev ARG COMPILER ARG COMPILER_VERSION ARG CXX_STDLIB +ARG R_VERSION ARG CRAN ENV BASE_IMAGE=${BASE_IMAGE}:${BASE_IMAGE_TAG} \ + R_VERSION=${R_VERSION} \ CRAN=${CRAN} ENV LANG=en_US.UTF-8 \ @@ -194,6 +196,7 @@ RUN apt-get update \ && apt-get install -y --no-install-recommends \ bash-completion \ file \ + fonts-texgyre \ gsfonts \ locales \ tzdata \ diff --git a/.devcontainer/debian-unstable-clang-18-libcpp/devcontainer.json b/.devcontainer/debian-unstable-clang-18-libcpp/devcontainer.json deleted file mode 100644 index 3714d55..0000000 --- a/.devcontainer/debian-unstable-clang-18-libcpp/devcontainer.json +++ /dev/null @@ -1,82 +0,0 @@ -{ - "name": "R devel (Debian unstable, Clang 18, libc++)", - "build": { - "dockerfile": "../Debian.Dockerfile", - "context": "..", - "args": { - "BASE_IMAGE": "debian", - "BASE_IMAGE_TAG": "unstable", - "COMPILER": "clang", - "COMPILER_VERSION": "18", - "CXX_STDLIB": "libc++", - "CRAN": "https://cloud.r-project.org", - "R_VERSION": "devel", - // "NCPUS": "1", - "INSTALL_COMMON_UTILS": "true", - "USE_ZSH_FOR_ROOT": "unset-to-use-bash", - "SET_LANG": "en_US.UTF-8", - "SET_TZ": "Etc/UTC" - } - }, - - "onCreateCommand": "onCreateCommand.sh", - "postCreateCommand": "postCreateCommand.sh", - "postStartCommand": "postStartCommand.sh", - - "features": { - "ghcr.io/devcontainers/features/common-utils:2": { - "configureZshAsDefaultShell": true, - "upgradePackages": false, - "username": "vscode", - "userUid": "automatic", - "userGid": "automatic" - }, - // A comma separated list of packages to install - "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { - "packages": "qpdf" - } - }, - - "customizations": { - "vscode": { - "extensions": [ - "DavidAnson.vscode-markdownlint", - "eamodio.gitlens@11.7.0", - "editorconfig.editorconfig", - "GitHub.vscode-pull-request-github", - "grapecity.gc-excelviewer", - "mhutchie.git-graph", - "mutantdino.resourcemonitor", - "redhat.vscode-yaml", - "REditorSupport.r", - "timonwong.shellcheck", - "exiasr.hadolint", - "ms-vscode.cpptools" - ], - "settings": { - "gitlens.showWelcomeOnInstall": false, - "gitlens.showWhatsNewAfterUpgrades": false, - "r.bracketedPaste": true, - "r.plot.useHttpgd": true, - "r.rterm.linux": "/usr/local/bin/radian", - "r.rterm.option": [ - "--no-save", - "--no-restore" - ], - "r.workspaceViewer.showObjectSize": true, - "resmon.show.battery": false, - "resmon.show.cpufreq": false - } - } - }, - - // Set 'remoteUser' to 'root' to connect as root instead. - "remoteUser": "vscode", - - "remoteEnv": { - // Pip: Install packages to the user site - "PIP_USER": "1", - // A comma separated list of packages to install - "R_PACKAGES": "fontquiver" - } -} diff --git a/.devcontainer/debian-unstable-clang-18/devcontainer.json b/.devcontainer/debian-unstable-clang-18/devcontainer.json deleted file mode 100644 index 3e0f6a1..0000000 --- a/.devcontainer/debian-unstable-clang-18/devcontainer.json +++ /dev/null @@ -1,81 +0,0 @@ -{ - "name": "R devel (Debian unstable, Clang 18)", - "build": { - "dockerfile": "../Debian.Dockerfile", - "context": "..", - "args": { - "BASE_IMAGE": "debian", - "BASE_IMAGE_TAG": "unstable", - "COMPILER": "clang", - "COMPILER_VERSION": "18", - "CRAN": "https://cloud.r-project.org", - "R_VERSION": "devel", - // "NCPUS": "1", - "INSTALL_COMMON_UTILS": "true", - "USE_ZSH_FOR_ROOT": "unset-to-use-bash", - "SET_LANG": "en_US.UTF-8", - "SET_TZ": "Etc/UTC" - } - }, - - "onCreateCommand": "onCreateCommand.sh", - "postCreateCommand": "postCreateCommand.sh", - "postStartCommand": "postStartCommand.sh", - - "features": { - "ghcr.io/devcontainers/features/common-utils:2": { - "configureZshAsDefaultShell": true, - "upgradePackages": false, - "username": "vscode", - "userUid": "automatic", - "userGid": "automatic" - }, - // A comma separated list of packages to install - "ghcr.io/rocker-org/devcontainer-features/apt-packages:1": { - "packages": "qpdf" - } - }, - - "customizations": { - "vscode": { - "extensions": [ - "DavidAnson.vscode-markdownlint", - "eamodio.gitlens@11.7.0", - "editorconfig.editorconfig", - "GitHub.vscode-pull-request-github", - "grapecity.gc-excelviewer", - "mhutchie.git-graph", - "mutantdino.resourcemonitor", - "redhat.vscode-yaml", - "REditorSupport.r", - "timonwong.shellcheck", - "exiasr.hadolint", - "ms-vscode.cpptools" - ], - "settings": { - "gitlens.showWelcomeOnInstall": false, - "gitlens.showWhatsNewAfterUpgrades": false, - "r.bracketedPaste": true, - "r.plot.useHttpgd": true, - "r.rterm.linux": "/usr/local/bin/radian", - "r.rterm.option": [ - "--no-save", - "--no-restore" - ], - "r.workspaceViewer.showObjectSize": true, - "resmon.show.battery": false, - "resmon.show.cpufreq": false - } - } - }, - - // Set 'remoteUser' to 'root' to connect as root instead. - "remoteUser": "vscode", - - "remoteEnv": { - // Pip: Install packages to the user site - "PIP_USER": "1", - // A comma separated list of packages to install - "R_PACKAGES": "fontquiver" - } -}