diff --git a/.devcontainer/.gitignore b/.devcontainer/.gitignore index 5db8eff..63f880a 100644 --- a/.devcontainer/.gitignore +++ b/.devcontainer/.gitignore @@ -1,6 +1,5 @@ * -!/debian-*/ !/conf/ !/conf/shell/ !/conf/shell/etc/ @@ -8,14 +7,15 @@ !/conf/shell/var/ !/conf/shell/var/tmp/ !/conf/shell/var/tmp/snippets/ +!/debian-*/ !/scripts/ !/scripts/usr/ !/scripts/usr/local/ !/scripts/usr/local/bin/ -!/debian-*/devcontainer.json !/conf/shell/etc/skel/.profile !/conf/shell/var/tmp/snippets/*.sh +!/debian-*/devcontainer.json !/scripts/usr/local/bin/*.sh !/.gitignore diff --git a/.devcontainer/Debian.Dockerfile b/.devcontainer/Debian.Dockerfile index 0317f0f..e8c0cd5 100644 --- a/.devcontainer/Debian.Dockerfile +++ b/.devcontainer/Debian.Dockerfile @@ -26,12 +26,14 @@ ARG DEBIAN_FRONTEND=noninteractive ARG COMPILER ARG COMPILER_VERSION +ARG CXX_STDLIB # hadolint ignore=DL3008,SC2086 -RUN apt-get update \ +RUN CXX_STDLIB_VERSION=${CXX_STDLIB:+$COMPILER_VERSION} \ + && apt-get update \ && apt-get install -y --no-install-recommends \ dpkg-dev \ - g++ \ + "${CXX_STDLIB:-g++}${CXX_STDLIB_VERSION:+-}${CXX_STDLIB_VERSION}${CXX_STDLIB:+-dev}" \ libc6-dev \ make \ ca-certificates \ @@ -108,11 +110,12 @@ RUN if [ "$R_VERSION" = "devel" ]; then \ R_SRC="base/R-${R_VERSION%%.*}/R-${R_VERSION}.tar.gz"; \ fi \ && cd /tmp \ - && wget --progress=dot:giga https://cran.r-project.org/src/${R_SRC} -O "R.tar.gz" \ + && 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 ${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 \ @@ -138,6 +141,7 @@ 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} \ @@ -159,14 +163,16 @@ RUN apt-get update \ && 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 \ - g++ \ + "${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 \ diff --git a/.devcontainer/debian-stable-clang-libcpp/devcontainer.json b/.devcontainer/debian-stable-clang-libcpp/devcontainer.json new file mode 100644 index 0000000..235ea46 --- /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": "future" + } +} diff --git a/.devcontainer/debian-stable-clang/devcontainer.json b/.devcontainer/debian-stable-clang/devcontainer.json index 68ba46f..7e4f411 100644 --- a/.devcontainer/debian-stable-clang/devcontainer.json +++ b/.devcontainer/debian-stable-clang/devcontainer.json @@ -48,7 +48,6 @@ "REditorSupport.r", "timonwong.shellcheck", "exiasr.hadolint", - "ms-azuretools.vscode-docker", "ms-vscode.cpptools" ], "settings": { diff --git a/.devcontainer/debian-stable-gcc/devcontainer.json b/.devcontainer/debian-stable-gcc/devcontainer.json index 661e9a8..c5787b5 100644 --- a/.devcontainer/debian-stable-gcc/devcontainer.json +++ b/.devcontainer/debian-stable-gcc/devcontainer.json @@ -47,7 +47,6 @@ "REditorSupport.r", "timonwong.shellcheck", "exiasr.hadolint", - "ms-azuretools.vscode-docker", "ms-vscode.cpptools" ], "settings": { diff --git a/.devcontainer/debian-testing-clang-libcpp/devcontainer.json b/.devcontainer/debian-testing-clang-libcpp/devcontainer.json new file mode 100644 index 0000000..12bc73a --- /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": "future" + } +} diff --git a/.devcontainer/debian-testing-clang/devcontainer.json b/.devcontainer/debian-testing-clang/devcontainer.json index 26adfaf..7954c23 100644 --- a/.devcontainer/debian-testing-clang/devcontainer.json +++ b/.devcontainer/debian-testing-clang/devcontainer.json @@ -48,7 +48,6 @@ "REditorSupport.r", "timonwong.shellcheck", "exiasr.hadolint", - "ms-azuretools.vscode-docker", "ms-vscode.cpptools" ], "settings": { diff --git a/.devcontainer/debian-testing-gcc/devcontainer.json b/.devcontainer/debian-testing-gcc/devcontainer.json index e973cd1..7fa5b3d 100644 --- a/.devcontainer/debian-testing-gcc/devcontainer.json +++ b/.devcontainer/debian-testing-gcc/devcontainer.json @@ -47,7 +47,6 @@ "REditorSupport.r", "timonwong.shellcheck", "exiasr.hadolint", - "ms-azuretools.vscode-docker", "ms-vscode.cpptools" ], "settings": { 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..e4db724 --- /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": "future" + } +} diff --git a/.devcontainer/debian-unstable-clang-18/devcontainer.json b/.devcontainer/debian-unstable-clang-18/devcontainer.json index 362df9b..7adde5a 100644 --- a/.devcontainer/debian-unstable-clang-18/devcontainer.json +++ b/.devcontainer/debian-unstable-clang-18/devcontainer.json @@ -50,7 +50,6 @@ "REditorSupport.r", "timonwong.shellcheck", "exiasr.hadolint", - "ms-azuretools.vscode-docker", "ms-vscode.cpptools" ], "settings": { diff --git a/.devcontainer/debian-unstable-clang-libcpp/devcontainer.json b/.devcontainer/debian-unstable-clang-libcpp/devcontainer.json new file mode 100644 index 0000000..0b266ee --- /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": "future" + } +} diff --git a/.devcontainer/debian-unstable-clang/devcontainer.json b/.devcontainer/debian-unstable-clang/devcontainer.json index e9168d4..d20bce9 100644 --- a/.devcontainer/debian-unstable-clang/devcontainer.json +++ b/.devcontainer/debian-unstable-clang/devcontainer.json @@ -49,7 +49,6 @@ "REditorSupport.r", "timonwong.shellcheck", "exiasr.hadolint", - "ms-azuretools.vscode-docker", "ms-vscode.cpptools" ], "settings": { diff --git a/.devcontainer/debian-unstable-gcc/devcontainer.json b/.devcontainer/debian-unstable-gcc/devcontainer.json index 9f9ea49..08baeed 100644 --- a/.devcontainer/debian-unstable-gcc/devcontainer.json +++ b/.devcontainer/debian-unstable-gcc/devcontainer.json @@ -48,7 +48,6 @@ "REditorSupport.r", "timonwong.shellcheck", "exiasr.hadolint", - "ms-azuretools.vscode-docker", "ms-vscode.cpptools" ], "settings": {