-
Notifications
You must be signed in to change notification settings - Fork 20
/
devcontainer.json
92 lines (92 loc) · 3.92 KB
/
devcontainer.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
{
"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"
}
}