{ "name": "LaTeX", // Instead of *building* the accompanying Dockerfile and its whole context, like: // // "build": { // "context": "..", // "dockerfile": "image/Dockerfile" // }, // // simply download the prepared image the author has already uploaded, based on // what's found inside the `image/` directory. // Advantages: // - build process is slow (downloads from TeX servers), each user doing it every // time is too much. It can take *hours* in worst-cases // - build might fail for various reasons // It is much easier to download the ready-made image. // Disadvantages: // - cannot easily iterate on the Docker image, need to go through Docker Hub. // Recourse: simply change the below to use the *local image temporarily* // - Upstream image on Docker Hub might not be the latest "image": "alexpovel/latex", "customizations": { "vscode": { // Set *default* container specific settings.json values on container create. "settings": { "terminal.integrated.defaultProfile.linux": "bash" }, // Add the IDs of extensions you want installed when the container is created. // Browse for extensions here: https://marketplace.visualstudio.com/ // then look for 'Unique Identifier' on the extension's page. "extensions": [ "James-Yu.latex-workshop", "streetsidesoftware.code-spell-checker", "streetsidesoftware.code-spell-checker-german" ] } }, "containerEnv": { // Inside the container, act as though we're in CI. Important for the Makefile. "CI": "true", // The base image has this locale: // $ docker run --rm --entrypoint="locale" alexpovel/latex // LANG= // LANGUAGE= // LC_CTYPE="POSIX" // LC_NUMERIC="POSIX" // LC_TIME="POSIX" // LC_COLLATE="POSIX" // LC_MONETARY="POSIX" // LC_MESSAGES="POSIX" // LC_PAPER="POSIX" // LC_NAME="POSIX" // LC_ADDRESS="POSIX" // LC_TELEPHONE="POSIX" // LC_MEASUREMENT="POSIX" // LC_IDENTIFICATION="POSIX" // LC_ALL= // *However*, starting this very same container in VSCode's Remote Containers, // the locale changes to: // $ locale // locale: Cannot set LC_CTYPE to default locale: No such file or directory // locale: Cannot set LC_MESSAGES to default locale: No such file or directory // locale: Cannot set LC_ALL to default locale: No such file or directory // LANG=en_US.UTF-8 // LANGUAGE= // LC_CTYPE="en_US.UTF-8" // LC_NUMERIC="en_US.UTF-8" // LC_TIME="en_US.UTF-8" // LC_COLLATE="en_US.UTF-8" // LC_MONETARY="en_US.UTF-8" // LC_MESSAGES="en_US.UTF-8" // LC_PAPER="en_US.UTF-8" // LC_NAME="en_US.UTF-8" // LC_ADDRESS="en_US.UTF-8" // LC_TELEPHONE="en_US.UTF-8" // LC_MEASUREMENT="en_US.UTF-8" // LC_IDENTIFICATION="en_US.UTF-8" // LC_ALL= // There's three errors because the container doesn't seem to have the correct // locale files: // $ locale -a // locale: Cannot set LC_CTYPE to default locale: No such file or directory // locale: Cannot set LC_MESSAGES to default locale: No such file or directory // locale: Cannot set LC_COLLATE to default locale: No such file or directory // C // C.UTF-8 // POSIX // This leads to `lualatex` erroring out, see also https://tex.stackexchange.com/q/374303/120853 // Using "POSIX" is possible and brings us back to vanilla container locale: "LC_ALL": "POSIX" } }