ignacio82

x11docker 3

Nov 15th, 2019
774
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 72.31 KB | None | 0 0
  1. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/stderr <==
  2.  
  3. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/stdout <==
  4.  
  5. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log <==
  6.  
  7. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/message.log <==
  8.  
  9. DEBUGNOTE[07:56:02,926]: check_host(): ps can watch root processes: yes
  10. x11docker[07:56:02,940]: Image name: rstudioxhost:verse
  11. Container command:
  12.  
  13. x11docker WARNING: User ignacio is member of group docker.
  14. That allows unprivileged processes on host to gain root privileges.
  15.  
  16. DEBUGNOTE[07:56:03,303]: storeinfo(): cache=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491
  17. DEBUGNOTE[07:56:03,316]: storeinfo(): stdout=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/stdout
  18. DEBUGNOTE[07:56:03,329]: storeinfo(): stderr=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/stderr
  19. DEBUGNOTE[07:56:03,367]: storeinfo(): x11dockerpid=141478
  20. DEBUGNOTE[07:56:03,433]:
  21. x11docker version: 6.4.0
  22. docker version: Docker version 19.03.4, build 9013bf583a
  23. Host system: "Debian GNU/Linux bullseye/sid"
  24. Command: '/usr/bin/x11docker' '--hostdisplay' '--gpu' '--runtime=nvidia' 'rstudioxhost:verse'
  25. Parsed options: --hostdisplay --gpu --runtime 'nvidia' -- 'rstudioxhost:verse'
  26. DEBUGNOTE[07:56:03,438]: Dependency check for --hostdisplay: 0
  27. DEBUGNOTE[07:56:03,442]: Dependencies of --hostdisplay already checked: 0
  28. DEBUGNOTE[07:56:03,446]: Dependencies of --hostdisplay already checked: 0
  29. DEBUGNOTE[07:56:03,450]: storeinfo(): xserver=--hostdisplay
  30. x11docker WARNING: Option --gpu degrades container isolation.
  31. Container gains access to GPU hardware.
  32. This allows reading host window content (palinopsia leak)
  33. and GPU rootkits (compare proof of concept: jellyfish).
  34.  
  35. x11docker note: Option --gpu: To allow GPU acceleration with --hostdisplay,
  36. x11docker will allow trusted cookies.
  37.  
  38. x11docker note: Option --hostdisplay: To allow --hostdisplay with trusted cookies,
  39. x11docker must share host IPC namespace with container (option --hostipc)
  40. to allow shared memory for X extension MIT-SHM.
  41.  
  42. x11docker WARNING: Option --hostdisplay with trusted cookies provides
  43. QUITE BAD CONTAINER ISOLATION !
  44. Keylogging and controlling host applications is possible!
  45. Clipboard sharing is enabled (option --cliboard).
  46. It is recommended to use another X server option like --xpra or --nxagent.
  47.  
  48. x11docker WARNING: Option --hostipc severely degrades
  49. container isolation. IPC namespace remapping is disabled.
  50.  
  51.  
  52. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/xinit.log <==
  53.  
  54. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/stderr <==
  55.  
  56. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/stdout <==
  57.  
  58. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log <==
  59.  
  60. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/message.log <==
  61.  
  62. DEBUGNOTE[07:56:02,926]: check_host(): ps can watch root processes: yes
  63. x11docker[07:56:02,940]: Image name: rstudioxhost:verse
  64. Container command:
  65.  
  66. x11docker WARNING: User ignacio is member of group docker.
  67. That allows unprivileged processes on host to gain root privileges.
  68.  
  69. DEBUGNOTE[07:56:03,303]: storeinfo(): cache=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491
  70. DEBUGNOTE[07:56:03,316]: storeinfo(): stdout=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/stdout
  71. DEBUGNOTE[07:56:03,329]: storeinfo(): stderr=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/stderr
  72. DEBUGNOTE[07:56:03,367]: storeinfo(): x11dockerpid=141478
  73. DEBUGNOTE[07:56:03,433]:
  74. x11docker version: 6.4.0
  75. docker version: Docker version 19.03.4, build 9013bf583a
  76. Host system: "Debian GNU/Linux bullseye/sid"
  77. Command: '/usr/bin/x11docker' '--hostdisplay' '--gpu' '--runtime=nvidia' 'rstudioxhost:verse'
  78. Parsed options: --hostdisplay --gpu --runtime 'nvidia' -- 'rstudioxhost:verse'
  79. DEBUGNOTE[07:56:03,438]: Dependency check for --hostdisplay: 0
  80. DEBUGNOTE[07:56:03,442]: Dependencies of --hostdisplay already checked: 0
  81. DEBUGNOTE[07:56:03,446]: Dependencies of --hostdisplay already checked: 0
  82. DEBUGNOTE[07:56:03,450]: storeinfo(): xserver=--hostdisplay
  83. x11docker WARNING: Option --gpu degrades container isolation.
  84. Container gains access to GPU hardware.
  85. This allows reading host window content (palinopsia leak)
  86. and GPU rootkits (compare proof of concept: jellyfish).
  87.  
  88. x11docker note: Option --gpu: To allow GPU acceleration with --hostdisplay,
  89. x11docker will allow trusted cookies.
  90.  
  91. x11docker note: Option --hostdisplay: To allow --hostdisplay with trusted cookies,
  92. x11docker must share host IPC namespace with container (option --hostipc)
  93. to allow shared memory for X extension MIT-SHM.
  94.  
  95. x11docker WARNING: Option --hostdisplay with trusted cookies provides
  96. QUITE BAD CONTAINER ISOLATION !
  97. Keylogging and controlling host applications is possible!
  98. Clipboard sharing is enabled (option --cliboard).
  99. It is recommended to use another X server option like --xpra or --nxagent.
  100.  
  101. x11docker WARNING: Option --hostipc severely degrades
  102. container isolation. IPC namespace remapping is disabled.
  103.  
  104.  
  105. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/xinit.log <==
  106.  
  107. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/message.log <==
  108. DEBUGNOTE[07:56:03,534]: waitforlogentry(): tailstdout: Waiting for logentry "x11docker=ready" in store.info
  109. DEBUGNOTE[07:56:03,535]: waitforlogentry(): tailstderr: Waiting for logentry "x11docker=ready" in store.info
  110. DEBUGNOTE[07:56:03,556]: storepid(): Stored pid '141917' of 'watchpidlist': 141917 pts/6 00:00:00 bash
  111. DEBUGNOTE[07:56:03,581]: storepid(): Stored pid '141931' of 'watchmessagefifo': 141931 pts/6 00:00:00 bash
  112. x11docker[07:56:03,613]: Virtual screen size: 3840x2160
  113.  
  114. x11docker[07:56:03,628]: Physical screen size:
  115. Screen 0: minimum 8 x 8, current 3840 x 2160, maximum 32767 x 32767
  116.  
  117. x11docker[07:56:03,645]: Detected host window manager: cinnamon --sm-disable
  118.  
  119. DEBUGNOTE[07:56:03,778]: NVIDIA: Detected driver version 430.50 on host.
  120. DEBUGNOTE[07:56:03,789]: NVIDIA runtime detected. Not installing driver.
  121. DEBUGNOTE[07:56:03,822]: storeinfo(): DISPLAY=:0
  122. DEBUGNOTE[07:56:03,834]: storeinfo(): XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client
  123. DEBUGNOTE[07:56:03,846]: storeinfo(): XSOCKET=/tmp/.X11-unix/X0
  124. DEBUGNOTE[07:56:03,857]: storeinfo(): XDG_RUNTIME_DIR=/run/user/738202
  125. DEBUGNOTE[07:56:03,869]: storeinfo(): Xenv= DISPLAY=:0 XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client XSOCKET=/tmp/.X11-unix/X0 XDG_RUNTIME_DIR=/run/user/738202
  126. x11docker[07:56:04,021]: --init: Found tini binary: /usr/bin/docker-init
  127.  
  128. DEBUGNOTE[07:56:04,026]: storeinfo(): tini=/usr/bin/docker-init
  129. DEBUGNOTE[07:56:04,039]: Users and terminal:
  130. x11docker was started by: ignacio
  131. As host user serves (running X, storing cache): ignacio
  132. Container user will be: ignacio
  133. Container user password: x11docker
  134. Getting permission to run docker with: eval
  135. Terminal for password frontend: bash -c
  136. Running in a terminal: yes
  137. Running on console: no
  138. Running over SSH: no
  139. Running sourced: no
  140. bash $-: hB
  141. DEBUGNOTE[07:56:04,045]: storeinfo(): containername=x11docker_X0_rstudioxhost-verse_33362576491
  142. x11docker WARNING: Sharing device file: /dev/dri
  143.  
  144. x11docker WARNING: Sharing device file: /dev/nvidia0
  145.  
  146. x11docker WARNING: Sharing device file: /dev/nvidiactl
  147.  
  148. x11docker WARNING: Sharing device file: /dev/nvidia-modeset
  149.  
  150. x11docker WARNING: Sharing device file: /dev/nvidia-uvm
  151.  
  152. x11docker WARNING: Sharing device file: /dev/nvidia-uvm-tools
  153.  
  154. x11docker WARNING: Sharing device file: /dev/vga_arbiter
  155.  
  156. DEBUGNOTE[07:56:04,580]: Docker command:
  157. docker run --tty --rm --detach \
  158. --name x11docker_X0_rstudioxhost-verse_33362576491 \
  159. --user 738202:89939 \
  160. --env USER=ignacio \
  161. --userns host \
  162. --group-add 44 \
  163. --group-add 108 \
  164. --runtime='nvidia' \
  165. --cap-drop ALL \
  166. --security-opt no-new-privileges \
  167. --security-opt label=type:container_runtime_t \
  168. --volume '/usr/bin/docker-init':'/usr/local/bin/tini':ro \
  169. --tmpfs /run --tmpfs /run/lock \
  170. --volume '/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share':'/x11docker':rw \
  171. --device '/dev/dri':'/dev/dri':rw \
  172. --device '/dev/nvidia0':'/dev/nvidia0':rw \
  173. --device '/dev/nvidiactl':'/dev/nvidiactl':rw \
  174. --device '/dev/nvidia-modeset':'/dev/nvidia-modeset':rw \
  175. --device '/dev/nvidia-uvm':'/dev/nvidia-uvm':rw \
  176. --device '/dev/nvidia-uvm-tools':'/dev/nvidia-uvm-tools':rw \
  177. --device '/dev/vga_arbiter':'/dev/vga_arbiter':rw \
  178. --volume '/tmp/.X11-unix/X0':'/X0':rw \
  179. --ipc host \
  180. --workdir '/tmp' \
  181. --entrypoint env \
  182. --env 'container=docker' \
  183. --env 'XAUTHORITY=/x11docker/Xauthority.client' \
  184. --env 'DISPLAY=:0' \
  185. --env 'XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR' \
  186. -- rstudioxhost:verse /usr/local/bin/tini -- /bin/sh - /x11docker/containerrc
  187. x11docker[07:56:04,874]: Generated dockerrc:
  188. 1 #! /usr/bin/env bash
  189. 2
  190. 3 # dockerrc:
  191. 4 # This script runs as root (or member of group docker) on host.
  192. 5 # - inspect image
  193. 6 # - pull image if needed
  194. 7 # - create containerrc
  195. 8 # - set up systemd/elogind cgroup if needed
  196. 9 # - run window manager in container or from host if needed
  197. 10
  198. 11 trap '' SIGINT
  199. 12
  200. 13 askyesno ()
  201. 14 {
  202. 15 local Choice;
  203. 16 read -t60 -n1 -p "(timeout after 60s assuming no) [Y|n]" Choice;
  204. 17 [ "$?" = '0' ] && {
  205. 18 [[ "$Choice" == [YyJj]* ]] || [ -z "$Choice" ] && return 0
  206. 19 };
  207. 20 return 1
  208. 21 }
  209. 22 checkpid ()
  210. 23 {
  211. 24 [ -e "/proc/${1:-NONSENSE}" ]
  212. 25 }
  213. 26 escapestring ()
  214. 27 {
  215. 28 echo "${1:-}" | LC_ALL=C sed -e 's/[^a-zA-Z0-9,._+@=:/-]/\\&/g; 1{$s/^$/""/}; 1!s/^/"/; $!s/$/"/'
  216. 29 }
  217. 30 mysleep ()
  218. 31 {
  219. 32 sleep "${1:-1}" 2> /dev/null || sleep 1
  220. 33 }
  221. 34 pspid ()
  222. 35 {
  223. 36 LC_ALL=C ps -p "${1:-}" 2> /dev/null | grep -v 'TIME'
  224. 37 }
  225. 38 rmcr ()
  226. 39 {
  227. 40 case "${1:-}" in
  228. 41 "")
  229. 42 sed "s/$(printf "\r")//g"
  230. 43 ;;
  231. 44 *)
  232. 45 sed -i "s/$(printf "\r")//g" "${1:-}"
  233. 46 ;;
  234. 47 esac
  235. 48 }
  236. 49 rocknroll ()
  237. 50 {
  238. 51 [ -s "$Timetosaygoodbyefile" ] && return 1;
  239. 52 [ -e "$Timetosaygoodbyefile" ] || return 1;
  240. 53 return 0
  241. 54 }
  242. 55 saygoodbye ()
  243. 56 {
  244. 57 debugnote "time to say goodbye ($*)";
  245. 58 [ -e "$Timetosaygoodbyefile" ] && echo timetosaygoodbye >> $Timetosaygoodbyefile;
  246. 59 [ -e "$Timetosaygoodbyefifo" ] && echo timetosaygoodbye >> $Timetosaygoodbyefifo
  247. 60 }
  248. 61 storeinfo ()
  249. 62 {
  250. 63 [ -e "$Storeinfofile" ] || return 1;
  251. 64 case "${1:-}" in
  252. 65 dump)
  253. 66 grep "^${2:-}=" $Storeinfofile | sed "s/^${2:-}=//"
  254. 67 ;;
  255. 68 drop)
  256. 69 sed -i "/^${2:-}=/d" $Storeinfofile
  257. 70 ;;
  258. 71 test)
  259. 72 grep -q "^${2:-}=" $Storeinfofile
  260. 73 ;;
  261. 74 *)
  262. 75 debugnote "storeinfo(): ${1:-}";
  263. 76 grep -q "^$(echo "${1:-}" | cut -d= -f1)=" $Storeinfofile && {
  264. 77 sed -i "/^$(echo "${1:-}" | cut -d= -f1)=/d" $Storeinfofile
  265. 78 };
  266. 79 echo "${1:-}" >> $Storeinfofile
  267. 80 ;;
  268. 81 esac
  269. 82 }
  270. 83 storepid ()
  271. 84 {
  272. 85 case "${1:-}" in
  273. 86 dump)
  274. 87 grep -w "${2:-}" "$Storepidfile" | cut -d' ' -f1
  275. 88 ;;
  276. 89 test)
  277. 90 grep -q -w "${2:-}" "$Storepidfile"
  278. 91 ;;
  279. 92 *)
  280. 93 echo "${1:-NOPID}" "${2:-NONAME}" >> "$Storepidfile";
  281. 94 debugnote "storepid(): Stored pid '${1:-}' of '${2:-}': $(pspid ${1:-} ||:)"
  282. 95 ;;
  283. 96 esac
  284. 97 }
  285. 98 waitforlogentry ()
  286. 99 {
  287. 100 local Startzeit Uhrzeit Dauer Count=0 Schlaf;
  288. 101 local Errorkeys="${4:-}";
  289. 102 local Warten="${5:-60}";
  290. 103 Startzeit="$(date +%s ||:)";
  291. 104 Startzeit="${Startzeit:-0}";
  292. 105 [ "$Warten" = "infinity" ] && Warten=32000;
  293. 106 debugnote "waitforlogentry(): ${1:-}: Waiting for logentry \"${3:-}\" in $(basename ${2:-})";
  294. 107 while ! grep -q "${3:-}" < "${2:-}"; do
  295. 108 Count="$(( $Count + 1 ))";
  296. 109 Uhrzeit="$(date +%s ||:)";
  297. 110 Uhrzeit="${Uhrzeit:-0}";
  298. 111 Dauer="$(( $Uhrzeit - $Startzeit ))";
  299. 112 Schlaf="$(( $Count / 10 ))";
  300. 113 [ "$Schlaf" = "0" ] && Schlaf="0.5";
  301. 114 mysleep "$Schlaf";
  302. 115 [ "$Dauer" -gt "10" ] && debugnote "waitforlogentry(): ${1:-}: Waiting since ${Dauer}s for log entry \"${3:-}\" in $(basename ${2:-})";
  303. 116 [ "$Dauer" -gt "$Warten" ] && error "waitforlogentry(): ${1:-}: Timeout waiting for log entry \"${3:-}\" in $(basename ${2:-})
  304. 117 Last lines of logfile $(basename ${2:-}):
  305. 118 $(tail "${2:-}")";
  306. 119 [ "$Errorkeys" ] && grep -i -q -E "$Errorkeys" < "${2:-}" && error "waitforlogentry(): ${1:-}: Found error message in logfile.
  307. 120 Last lines of logfile $(basename ${2:-}):
  308. 121 $(tail "${2:-}")";
  309. 122 rocknroll || {
  310. 123 debugnote "waitforlogentry(): ${1:-}: Stopped waiting for ${3:-} in $(basename ${2:-}) due to terminating signal.";
  311. 124 return 1
  312. 125 };
  313. 126 done;
  314. 127 debugnote "waitforlogentry(): ${1:-}: Found log entry \"${3:-}\" in $(basename ${2:-}).";
  315. 128 return 0
  316. 129 }
  317. 130
  318. 131 warning() {
  319. 132 echo "$*:WARNING" | sed "s/\$/ /" >>$Messagefile
  320. 133 }
  321. 134 note() {
  322. 135 echo "$*:NOTE" | sed "s/\$/ /" >>$Messagefile
  323. 136 }
  324. 137 verbose() {
  325. 138 echo "$*:VERBOSE" | sed "s/\$/ /" >>$Messagefile
  326. 139 }
  327. 140 debugnote() {
  328. 141 echo "$*:DEBUGNOTE" | sed "s/\$/ /" >>$Messagefile
  329. 142 }
  330. 143 error() {
  331. 144 echo "$*:ERROR" | sed "s/\$/ /" >>$Messagefile
  332. 145 exit 64
  333. 146 }
  334. 147 stdout() {
  335. 148 echo "$*:STDOUT" | sed "s/\$/ /" >>$Messagefile
  336. 149 }
  337. 150
  338. 151 Containercommand=""
  339. 152 Imagename="rstudioxhost:verse"
  340. 153 Messagefile='/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/message.fifo'
  341. 154 Newxenv=' DISPLAY=:0 XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client XSOCKET=/tmp/.X11-unix/X0 XDG_RUNTIME_DIR=/run/user/738202'
  342. 155 export PATH='/usr/local/buildtools/java/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games'
  343. 156 Storeinfofile='/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/store.info'
  344. 157 Storepidfile='/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/store.pids'
  345. 158 Timetosaygoodbyefile='/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/timetosaygoodbye'
  346. 159 Timetosaygoodbyefifo='/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/timetosaygoodbye.fifo'
  347. 160 Xserver='--hostdisplay'
  348. 161 Workdir=''
  349. 162
  350. 163 Containerid=
  351. 164 Containerip=
  352. 165 Dockerlogspid=''
  353. 166 Dockerpull=
  354. 167 Exec=
  355. 168 Entrypoint=
  356. 169 Failure=
  357. 170 Imageuser=
  358. 171 Inspect=
  359. 172 Line=
  360. 173 Pid1pid=
  361. 174 Runtime=
  362. 175 Signal=
  363. 176 Windowmanager=
  364. 177 Windowmanagercommand=
  365. 178 Wmcontainerid=
  366. 179 Wmdockercommand=
  367. 180 Workdir=
  368. 181 debugnote 'Running dockerrc: Setup as root or as user docker on host.'
  369. 182
  370. 183
  371. 184 # Check whether docker daemon is running, get docker info
  372. 185 docker info >>/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/docker.info 2>>/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log || {
  373. 186 error "Calling docker daemon failed.
  374. 187 Is docker daemon running at all?
  375. 188 Try to start docker daemon with: systemctl start docker
  376. 189 Last lines of log:
  377. 190 $(rmcr < '/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log' | tail)"
  378. 191 }
  379. 192
  380. 193 # Check default runtime
  381. 194 Runtime="$(grep 'Default Runtime' < '/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/docker.info' | awk '{print $3}')"
  382. 195 debugnote "dockerrc: Found default Runtime: $Runtime"
  383. 196 debugnote "dockerrc: All $(grep 'Runtimes' < '/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/docker.info')"
  384. 197 [ "$Runtime" != 'nvidia' ] && {
  385. 198 case $Runtime in
  386. 199 kata-runtime) warning 'Found default docker runtime kata-runtime.
  387. 200 Please run x11docker with --runtime=kata-runtime to avoid issues.' ;;
  388. 201 nvidia) [ 'yes' = 'yes' ] && warning 'Option --gpu: Found default docker runtime nvidia.
  389. 202 Please run x11docker with --runtime=nvidia to avoid issues.' ;;
  390. 203 runc|crun) ;;
  391. 204 *) warning "Found unknown container runtime: $Runtime
  392. 205 Please report at: https://github.com/mviereck/x11docker" ;;
  393. 206 esac
  394. 207 Runtime='nvidia'
  395. 208 }
  396. 209 debugnote "dockerrc: Container Runtime: $Runtime"
  397. 210 storeinfo "runtime=$Runtime"
  398. 211
  399. 212 # Refresh images.list for x11docker-gui
  400. 213 docker images 2>>/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log | grep -v REPOSITORY | awk '{print $1 ":" $2}' >>/home/ignacio/.cache/x11docker/docker.imagelist.sort
  401. 214 rmcr /home/ignacio/.cache/x11docker/docker.imagelist.sort
  402. 215 while read -r Line ; do
  403. 216 grep -q "<none>" <<<$Line || echo $Line >> /home/ignacio/.cache/x11docker/docker.imagelist
  404. 217 done < <(sort < /home/ignacio/.cache/x11docker/docker.imagelist.sort)
  405. 218 rm /home/ignacio/.cache/x11docker/docker.imagelist.sort
  406. 219
  407. 220 # Check if image rstudioxhost:verse is available locally
  408. 221 Dockerpull=no
  409. 222 grep -x -q 'rstudioxhost:verse' < /home/ignacio/.cache/x11docker/docker.imagelist || grep -x -q 'rstudioxhost:verse:latest' < /home/ignacio/.cache/x11docker/docker.imagelist || {
  410. 223 docker inspect rstudioxhost:verse >>/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log 2>&1 || {
  411. 224 echo 'Image rstudioxhost:verse not found locally.' >&2
  412. 225 echo 'Do you want to pull it from docker hub?' >&2
  413. 226 askyesno && Dockerpull=yes || error "Image 'rstudioxhost:verse' not available locally and not pulled from docker hub."
  414. 227 }
  415. 228 }
  416. 229
  417. 230 rocknroll || exit 64
  418. 231
  419. 232 [ "$Dockerpull" = 'yes' ] && {
  420. 233 note "Pulling image 'rstudioxhost:verse' from docker hub"
  421. 234 docker pull rstudioxhost:verse 1>&2 || error "Pulling docker image 'rstudioxhost:verse' seems to have failed!"
  422. 235 }
  423. 236
  424. 237 rocknroll || exit 64
  425. 238
  426. 239 Inspect="$(docker inspect rstudioxhost:verse --format='{{.Config.Entrypoint}}{{.Config.Cmd}}[{{.Config.User}}][{{.Config.WorkingDir}}]')"
  427. 240
  428. 241 # Check CMD
  429. 242 [ -z "$Containercommand" ] && {
  430. 243 # extract image command from image if not given on cli
  431. 244 Containercommand="$(cut -d] -f2 <<< "$Inspect" | cut -d[ -f2)"
  432. 245 debugnote "dockerrc: Image CMD: $Containercommand"
  433. 246 echo "$Containercommand" | grep -q /x11docker/containerrc && error 'Recursion error: Found CMD /x11docker/containerrc in image.
  434. 247 Did you use docker commit with an x11docker container?
  435. 248 Please build new images with a Dockerfile instead of using docker commit,
  436. 249 or provide a different container command.'
  437. 250 }
  438. 251
  439. 252 # Check USER
  440. 253 Imageuser="$(cut -d[ -f4 <<< "$Inspect" | cut -d] -f1)"
  441. 254 debugnote "dockerrc: Image USER: $Imageuser"
  442. 255 [ "$Imageuser" ] && note "Found 'USER $Imageuser' in image.
  443. 256 If you want to run with user $Imageuser instead of host user ignacio,
  444. 257 than run with --user=RETAIN."
  445. 258 storeinfo containeruser="ignacio"
  446. 259
  447. 260 # Check ENTRYPOINT
  448. 261 Entrypoint="$(cut -d] -f1 <<< "$Inspect" | cut -d[ -f2)"
  449. 262 debugnote "dockerrc: Image ENTRYPOINT: $Entrypoint"
  450. 263 echo "$Entrypoint" | grep -qE 'tini|init|systemd' && {
  451. 264 note "There seems to be an init system in ENTRYPOINT of image:
  452. 265 $Entrypoint
  453. 266 Will disable it as x11docker already runs an init with option --tini.
  454. 267 To allow this ENTRYPOINT, run x11docker with option --init=none."
  455. 268 Entrypoint=
  456. 269 }
  457. 270
  458. 271 # Check WORKDIR
  459. 272 Workdir="$(cut -d[ -f5 <<< "$Inspect" | cut -d] -f1)"
  460. 273 debugnote "dockerrc: Image WORKDIR: $Workdir"
  461. 274 [ "$Workdir" ] && note "Found 'WORKDIR $Workdir' in image.
  462. 275 You can change it with option --workdir=DIR."
  463. 276
  464. 277 [ -z "$Containercommand$Entrypoint" ] && error 'No container command specified and no CMD or ENTRYPOINT found in image.'
  465. 278
  466. 279 ######## Create containerrc ########
  467. 280
  468. 281 { echo '#! /bin/sh'
  469. 282 echo ''
  470. 283 echo '# containerrc'
  471. 284 echo '# Created startscript for docker run used as container command.'
  472. 285 echo '# Runs as unprivileged user in container.'
  473. 286 echo ''
  474. 287 echo 'exec 6>&1 7>&2'
  475. 288 echo 'exec >>/x11docker/container.log 2>&1'
  476. 289 echo ''
  477. 290 echo 'mysleep ()
  478. 291 {
  479. 292 sleep "${1:-1}" 2> /dev/null || sleep 1
  480. 293 }'
  481. 294 echo 'rocknroll ()
  482. 295 {
  483. 296 [ -s "$Timetosaygoodbyefile" ] && return 1;
  484. 297 [ -e "$Timetosaygoodbyefile" ] || return 1;
  485. 298 return 0
  486. 299 }'
  487. 300 echo 'saygoodbye ()
  488. 301 {
  489. 302 debugnote "time to say goodbye ($*)";
  490. 303 [ -e "$Timetosaygoodbyefile" ] && echo timetosaygoodbye >> $Timetosaygoodbyefile;
  491. 304 [ -e "$Timetosaygoodbyefifo" ] && echo timetosaygoodbye >> $Timetosaygoodbyefifo
  492. 305 }'
  493. 306 echo 'storeinfo ()
  494. 307 {
  495. 308 [ -e "$Storeinfofile" ] || return 1;
  496. 309 case "${1:-}" in
  497. 310 dump)
  498. 311 grep "^${2:-}=" $Storeinfofile | sed "s/^${2:-}=//"
  499. 312 ;;
  500. 313 drop)
  501. 314 sed -i "/^${2:-}=/d" $Storeinfofile
  502. 315 ;;
  503. 316 test)
  504. 317 grep -q "^${2:-}=" $Storeinfofile
  505. 318 ;;
  506. 319 *)
  507. 320 debugnote "storeinfo(): ${1:-}";
  508. 321 grep -q "^$(echo "${1:-}" | cut -d= -f1)=" $Storeinfofile && {
  509. 322 sed -i "/^$(echo "${1:-}" | cut -d= -f1)=/d" $Storeinfofile
  510. 323 };
  511. 324 echo "${1:-}" >> $Storeinfofile
  512. 325 ;;
  513. 326 esac
  514. 327 }'
  515. 328 echo 'waitforlogentry ()
  516. 329 {
  517. 330 local Startzeit Uhrzeit Dauer Count=0 Schlaf;
  518. 331 local Errorkeys="${4:-}";
  519. 332 local Warten="${5:-60}";
  520. 333 Startzeit="$(date +%s ||:)";
  521. 334 Startzeit="${Startzeit:-0}";
  522. 335 [ "$Warten" = "infinity" ] && Warten=32000;
  523. 336 debugnote "waitforlogentry(): ${1:-}: Waiting for logentry \"${3:-}\" in $(basename ${2:-})";
  524. 337 while ! grep -q "${3:-}" < "${2:-}"; do
  525. 338 Count="$(( $Count + 1 ))";
  526. 339 Uhrzeit="$(date +%s ||:)";
  527. 340 Uhrzeit="${Uhrzeit:-0}";
  528. 341 Dauer="$(( $Uhrzeit - $Startzeit ))";
  529. 342 Schlaf="$(( $Count / 10 ))";
  530. 343 [ "$Schlaf" = "0" ] && Schlaf="0.5";
  531. 344 mysleep "$Schlaf";
  532. 345 [ "$Dauer" -gt "10" ] && debugnote "waitforlogentry(): ${1:-}: Waiting since ${Dauer}s for log entry \"${3:-}\" in $(basename ${2:-})";
  533. 346 [ "$Dauer" -gt "$Warten" ] && error "waitforlogentry(): ${1:-}: Timeout waiting for log entry \"${3:-}\" in $(basename ${2:-})
  534. 347 Last lines of logfile $(basename ${2:-}):
  535. 348 $(tail "${2:-}")";
  536. 349 [ "$Errorkeys" ] && grep -i -q -E "$Errorkeys" < "${2:-}" && error "waitforlogentry(): ${1:-}: Found error message in logfile.
  537. 350 Last lines of logfile $(basename ${2:-}):
  538. 351 $(tail "${2:-}")";
  539. 352 rocknroll || {
  540. 353 debugnote "waitforlogentry(): ${1:-}: Stopped waiting for ${3:-} in $(basename ${2:-}) due to terminating signal.";
  541. 354 return 1
  542. 355 };
  543. 356 done;
  544. 357 debugnote "waitforlogentry(): ${1:-}: Found log entry \"${3:-}\" in $(basename ${2:-}).";
  545. 358 return 0
  546. 359 }'
  547. 360 echo 'calculate() {'
  548. 361 echo ' LC_ALL=C printf %.3f\\n "$((10**9 * $@))e-9"'
  549. 362 echo '}'
  550. 363 echo '
  551. 364 warning() {
  552. 365 echo "$*:WARNING" | sed "s/\$/ /" >>$Messagefile
  553. 366 }
  554. 367 note() {
  555. 368 echo "$*:NOTE" | sed "s/\$/ /" >>$Messagefile
  556. 369 }
  557. 370 verbose() {
  558. 371 echo "$*:VERBOSE" | sed "s/\$/ /" >>$Messagefile
  559. 372 }
  560. 373 debugnote() {
  561. 374 echo "$*:DEBUGNOTE" | sed "s/\$/ /" >>$Messagefile
  562. 375 }
  563. 376 error() {
  564. 377 echo "$*:ERROR" | sed "s/\$/ /" >>$Messagefile
  565. 378 exit 64
  566. 379 }
  567. 380 stdout() {
  568. 381 echo "$*:STDOUT" | sed "s/\$/ /" >>$Messagefile
  569. 382 }'
  570. 383 echo 'Messagefile=/x11docker/message.fifo'
  571. 384 echo 'Storeinfofile=/x11docker/store.info'
  572. 385 echo 'Timetosaygoodbyefile=/x11docker/timetosaygoodbye'
  573. 386 echo ''
  574. 387 echo 'waitforlogentry containerrc $Storeinfofile containerrootrc=ready infinity'
  575. 388 echo 'debugnote "Running containerrc: Unprivileged user commands in container"'
  576. 389 echo ''
  577. 390 echo "Containercommand=\"$Containercommand\""
  578. 391 echo "Entrypoint=\"$Entrypoint\""
  579. 392 echo ''
  580. 393 echo 'verbose "containerrc: Container system:'
  581. 394 echo '$(cat /etc/os-release 2>&1 ||:)"'
  582. 395 echo ''
  583. 396 } >> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/containerrc
  584. 397 {
  585. 398 echo ''
  586. 399 echo '# USER and HOME'
  587. 400 echo 'Containeruser="$(storeinfo dump containeruser)"'
  588. 401 echo 'Containeruserhome="/fakehome/ignacio"'
  589. 402 echo 'export USER="$Containeruser"'
  590. 403 echo 'export HOME="$Containeruserhome"'
  591. 404 echo ''
  592. 405 echo '# XDG_RUNTIME_DIR'
  593. 406 echo 'Containeruseruid=$(id -u $Containeruser)'
  594. 407 echo 'export XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR'
  595. 408 echo '[ -e /run/user/$Containeruseruid ] && ln -s /run/user/$Containeruseruid $XDG_RUNTIME_DIR || mkdir -p -m700 $XDG_RUNTIME_DIR'
  596. 409 echo ''
  597. 410 echo 'mkdir -p $Containeruserhome'
  598. 411 echo '# Copy files from /etc/skel into empty HOME'
  599. 412 echo '[ -d /etc/skel ] && [ -z "$(ls -A "/fakehome/ignacio" 2>/dev/null | grep -v gnupg)" ] && {'
  600. 413 echo ' debugnote "containerrc: HOME is empty. Copying from /etc/skel"'
  601. 414 echo ' cp -n -R /etc/skel/. $Containeruserhome'
  602. 415 echo ' :'
  603. 416 echo '} || {'
  604. 417 echo ' debugnote "containerrc: HOME not empty. Not copying from /etc/skel"'
  605. 418 echo '}'
  606. 419 echo ''
  607. 420 echo '# Create softlink to X unix socket'
  608. 421 echo '[ -e /tmp/.X11-unix/X0 ] || ln -s /X0 /tmp/.X11-unix'
  609. 422 echo ''
  610. 423 echo 'unset WAYLAND_DISPLAY'
  611. 424 echo ''
  612. 425 echo 'export XDG_SESSION_TYPE=x11'
  613. 426 echo ''
  614. 427 echo ''
  615. 428 echo 'bash --version >/dev/null 2>&1 && export SHELL=/bin/bash || export SHELL=/bin/sh'
  616. 429 echo 'export TERM=xterm'
  617. 430 echo 'storeinfo test locale && export LANG="$(storeinfo dump locale)"'
  618. 431 echo '[ -e "/usr/share/zoneinfo/America/Los_Angeles" ] || export TZ=UTC+08'
  619. 432 echo '[ "$(date -Ihours)" != "2019-11-15T07-08:00" ] && export TZ=UTC+08'
  620. 433 echo '[ "$DEBIAN_FRONTEND" = noninteractive ] && unset DEBIAN_FRONTEND && export DEBIAN_FRONTEND'
  621. 434 echo '[ "$DEBIAN_FRONTEND" = newt ] && unset DEBIAN_FRONTEND && export DEBIAN_FRONTEND'
  622. 435 echo '# container environment (--env)'
  623. 436 echo "export 'container=docker'"
  624. 437 echo "export 'XAUTHORITY=/x11docker/Xauthority.client'"
  625. 438 echo "export 'DISPLAY=:0'"
  626. 439 echo "export 'XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR'"
  627. 440 echo ''
  628. 441 echo 'env >> /x11docker/container.environment'
  629. 442 echo 'verbose "Container environment:'
  630. 443 echo '$(env | sort)"'
  631. 444 echo ''
  632. 445 echo 'cd "$HOME"'
  633. 446 [ "$Workdir" ] && echo "[ -d \"$Workdir\" ] && cd \"$Workdir\" # WORKDIR in image"
  634. 447 echo ''
  635. 448 echo "debugnote \"containerrc: Running container command:
  636. 449 \$Dbus $Entrypoint $Containercommand
  637. 450 \""
  638. 451 echo ''
  639. 452 echo 'exec 1>&6 2>&7 6>&- 7>&-'
  640. 453 echo "$Exec \$Dbus $Entrypoint $Containercommand >>/x11docker/stdout 2>>/x11docker/stderr"
  641. 454 echo "storeinfo cmdexitcode=\$?"
  642. 455 } >> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/containerrc
  643. 456 ######## End of containerrc ########
  644. 457
  645. 458 # Write containerrc into x11docker.log
  646. 459 nl -ba >> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/x11docker.log < /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/containerrc
  647. 460
  648. 461 # Send signal to run X and wait for X to be ready
  649. 462 storeinfo readyforX=ready
  650. 463 waitforlogentry 'dockerrc' /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/xinit.log 'xinitrc is ready' 'xinit: giving up|unable to connect to X server|Connection refused|server error|Only console users are allowed'
  651. 464
  652. 465 rocknroll || exit 64
  653. 466
  654. 467
  655. 468 rocknroll || exit 64
  656. 469
  657. 470
  658. 471 #### run docker image ####
  659. 472 read Containerid < <(docker run --tty --rm --detach \
  660. 473 --name x11docker_X0_rstudioxhost-verse_33362576491 \
  661. 474 --user 738202:89939 \
  662. 475 --env USER=ignacio \
  663. 476 --userns host \
  664. 477 --group-add 44 \
  665. 478 --group-add 108 \
  666. 479 --runtime='nvidia' \
  667. 480 --cap-drop ALL \
  668. 481 --security-opt no-new-privileges \
  669. 482 --security-opt label=type:container_runtime_t \
  670. 483 --volume '/usr/bin/docker-init':'/usr/local/bin/tini':ro \
  671. 484 --tmpfs /run --tmpfs /run/lock \
  672. 485 --volume '/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share':'/x11docker':rw \
  673. 486 --device '/dev/dri':'/dev/dri':rw \
  674. 487 --device '/dev/nvidia0':'/dev/nvidia0':rw \
  675. 488 --device '/dev/nvidiactl':'/dev/nvidiactl':rw \
  676. 489 --device '/dev/nvidia-modeset':'/dev/nvidia-modeset':rw \
  677. 490 --device '/dev/nvidia-uvm':'/dev/nvidia-uvm':rw \
  678. 491 --device '/dev/nvidia-uvm-tools':'/dev/nvidia-uvm-tools':rw \
  679. 492 --device '/dev/vga_arbiter':'/dev/vga_arbiter':rw \
  680. 493 --volume '/tmp/.X11-unix/X0':'/X0':rw \
  681. 494 --ipc host \
  682. 495 --workdir '/tmp' \
  683. 496 --entrypoint env \
  684. 497 --env 'container=docker' \
  685. 498 --env 'XAUTHORITY=/x11docker/Xauthority.client' \
  686. 499 --env 'DISPLAY=:0' \
  687. 500 --env 'XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR' \
  688. 501 -- rstudioxhost:verse /usr/local/bin/tini -- /bin/sh - /x11docker/containerrc 2>>/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log | rmcr)
  689. 502 ##########################
  690. 503
  691. 504
  692. 505 [ "$Containerid" ] || {
  693. 506 error "Startup of docker failed. Did not receive a container ID.
  694. 507
  695. 508 Last lines of container log:
  696. 509 $(rmcr < /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log | tail)"
  697. 510 }
  698. 511 storeinfo containerid="$Containerid"
  699. 512 # Wait for container to be ready
  700. 513 for ((Count=1 ; Count<=40 ; Count++)); do
  701. 514 docker exec x11docker_X0_rstudioxhost-verse_33362576491 sh -c : 2>&1 | rmcr >>/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log && { debugnote 'dockerrc: Container is up and running.' ; break ; } || debugnote "dockerrc: Container not ready on $Count. attempt, trying again."
  702. 515 rocknroll || exit 64
  703. 516 mysleep 0.1
  704. 517 done
  705. 518
  706. 519 # Wait for pid 1 in container
  707. 520 for ((Count=1 ; Count<=40 ; Count++)); do
  708. 521 Pid1pid="$(docker inspect --format '{{.State.Pid}}' x11docker_X0_rstudioxhost-verse_33362576491 2>>/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log | rmcr)"
  709. 522 debugnote "dockerrc: $Count. check for PID 1: $Pid1pid"
  710. 523 checkpid "$Pid1pid" && break
  711. 524 rocknroll || exit 64
  712. 525 mysleep 0.1
  713. 526 done
  714. 527 storeinfo pid1pid="$Pid1pid"
  715. 528
  716. 529 # Get IP of container
  717. 530 Containerip="$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' x11docker_X0_rstudioxhost-verse_33362576491 2>>/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log)"
  718. 531 storeinfo containerip=$Containerip
  719. 532
  720. 533 # Check log for startup failure
  721. 534 Failure="$(rmcr < /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log | grep -v grep | grep -E 'Error response from daemon|OCI runtime exec' ||:)"
  722. 535 [ "$Failure" ] && {
  723. 536 echo "$Failure" >>/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log
  724. 537 error "Got error message from docker daemon:
  725. 538 $Failure
  726. 539
  727. 540 Last lines of logfile:
  728. 541 "
  729. 542 }
  730. 543
  731. 544 # copy containerrootrc inside of container to avoid possible noexec of host home.
  732. 545 docker exec --tty x11docker_X0_rstudioxhost-verse_33362576491 sh -c 'cp /x11docker/containerrootrc /tmp/containerrootrc ; chmod 644 /tmp/containerrootrc' 2>&1 | rmcr >>/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log
  733. 546 # run container root setup. containerrc will wait until setup script is ready.
  734. 547 docker exec --tty -u root x11docker_X0_rstudioxhost-verse_33362576491 /bin/sh /tmp/containerrootrc 2>&1 | rmcr >>/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log
  735. 548
  736. 549 storeinfo dockerrc=ready
  737. 550
  738. 551 [ "$Containerid" ] || [ "$Wmcontainerid" ] && {
  739. 552 # wait for signal of finish()
  740. 553 read Signal </home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/dockerrc.stopfifo
  741. 554 [ "$Signal" = "stop" ] && {
  742. 555 [ "$Containerid" ] && docker stop $Containerid >> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log 2>&1 &
  743. 556 [ "$Wmcontainerid" ] && docker stop $Wmcontainerid >> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log 2>&1 &
  744. 557 [ "$Dockerlogspid" ] && kill $Dockerlogspid >> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log 2>&1 &
  745. 558 }
  746. 559 } & storepid $! dockerstopshell
  747. 560 exit 0
  748.  
  749. x11docker[07:56:04,978]: Generated containerrootrc:
  750. 1 #! /bin/sh
  751. 2
  752. 3 # containerrootrc
  753. 4 # This Script is executed as root in container.
  754. 5 # - Create container user
  755. 6 # - Time zone
  756. 7 # - Install NVIDIA driver if requested
  757. 8 # - Set up init system services and DBus for --init=systemd|openrc|runit|sysvinit
  758. 9
  759. 10 # redirect output to have it available before 'docker logs' starts. --init=runit (void) would eat up the output at all for unknown reasons.
  760. 11 exec 1>>/x11docker/container.log 2>&1
  761. 12
  762. 13 storeinfo ()
  763. 14 {
  764. 15 [ -e "$Storeinfofile" ] || return 1;
  765. 16 case "${1:-}" in
  766. 17 dump)
  767. 18 grep "^${2:-}=" $Storeinfofile | sed "s/^${2:-}=//"
  768. 19 ;;
  769. 20 drop)
  770. 21 sed -i "/^${2:-}=/d" $Storeinfofile
  771. 22 ;;
  772. 23 test)
  773. 24 grep -q "^${2:-}=" $Storeinfofile
  774. 25 ;;
  775. 26 *)
  776. 27 debugnote "storeinfo(): ${1:-}";
  777. 28 grep -q "^$(echo "${1:-}" | cut -d= -f1)=" $Storeinfofile && {
  778. 29 sed -i "/^$(echo "${1:-}" | cut -d= -f1)=/d" $Storeinfofile
  779. 30 };
  780. 31 echo "${1:-}" >> $Storeinfofile
  781. 32 ;;
  782. 33 esac
  783. 34 }
  784. 35 rocknroll ()
  785. 36 {
  786. 37 [ -s "$Timetosaygoodbyefile" ] && return 1;
  787. 38 [ -e "$Timetosaygoodbyefile" ] || return 1;
  788. 39 return 0
  789. 40 }
  790. 41
  791. 42 warning() {
  792. 43 echo "$*:WARNING" | sed "s/\$/ /" >>$Messagefile
  793. 44 }
  794. 45 note() {
  795. 46 echo "$*:NOTE" | sed "s/\$/ /" >>$Messagefile
  796. 47 }
  797. 48 verbose() {
  798. 49 echo "$*:VERBOSE" | sed "s/\$/ /" >>$Messagefile
  799. 50 }
  800. 51 debugnote() {
  801. 52 echo "$*:DEBUGNOTE" | sed "s/\$/ /" >>$Messagefile
  802. 53 }
  803. 54 error() {
  804. 55 echo "$*:ERROR" | sed "s/\$/ /" >>$Messagefile
  805. 56 exit 64
  806. 57 }
  807. 58 stdout() {
  808. 59 echo "$*:STDOUT" | sed "s/\$/ /" >>$Messagefile
  809. 60 }
  810. 61 Messagefile=/x11docker/message.fifo
  811. 62 Storeinfofile='/x11docker/store.info'
  812. 63 Timetosaygoodbyefile=/x11docker/timetosaygoodbye
  813. 64
  814. 65 debugnote 'Running containerrootrc: Setup as root in container'
  815. 66
  816. 67 # Check type of libc
  817. 68 ldd --version 2>&1 | grep -q 'musl libc' && Containerlibc='musl'
  818. 69 ldd --version 2>&1 | grep -q -E 'GLIBC|GNU libc' && Containerlibc='glibc'
  819. 70 debugnote "containerrootrc: Container libc: $Containerlibc"
  820. 71
  821. 72 # Prepare X environment
  822. 73 # Create some system dirs with needed permissions
  823. 74 mkdir -v -p /var/lib/dbus /var/run/dbus
  824. 75 mkdir -v -p -m 1777 /tmp/.ICE-unix /tmp/.X11-unix /tmp/.font-unix
  825. 76 chmod -c 1777 /tmp/.ICE-unix /tmp/.X11-unix /tmp/.font-unix
  826. 77 export DISPLAY=:0 XAUTHORITY=/x11docker/Xauthority.client
  827. 78 [ -e /X0 ] && ln -s /X0 /tmp/.X11-unix/X0
  828. 79 ls -l /X0
  829. 80 ls -l /tmp/.X11-unix/X0
  830. 81
  831. 82 # Time zone
  832. 83 [ ! -d /usr/share/zoneinfo ] && [ "$Containerlibc" = "glibc" ] && {
  833. 84 mkdir -p /usr/share/zoneinfo/America
  834. 85 cp '/x11docker/libc.localtime' '/usr/share/zoneinfo/America/Los_Angeles'
  835. 86 }
  836. 87 [ -e '/usr/share/zoneinfo/America/Los_Angeles' ] && ln -f -s '/usr/share/zoneinfo/America/Los_Angeles' /etc/localtime
  837. 88
  838. 89 # Container system
  839. 90 Containersystem="$(grep '^ID=' /etc/os-release 2>/dev/null | cut -d= -f2 || echo 'unknown')"
  840. 91 verbose "Container system ID: $Containersystem"
  841. 92
  842. 93 # Environment variables
  843. 94 export 'container=docker'
  844. 95 export 'XAUTHORITY=/x11docker/Xauthority.client'
  845. 96 export 'DISPLAY=:0'
  846. 97 export 'XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR'
  847. 98
  848. 99 # Check container user
  849. 100 Containeruser="$(storeinfo dump containeruser)"
  850. 101
  851. 102 mkdir -v -m 777 /fakehome
  852. 103 Containeruserhome='/fakehome/ignacio'
  853. 104
  854. 105 # Create user entry in /etc/passwd (and delete possibly existing same uid)
  855. 106 cat /etc/passwd | grep -v ':738202:' > /tmp/passwd
  856. 107
  857. 108 # Disable possible /etc/shadow passwords for other users
  858. 109 sed -i 's%:x:%:-:%' /tmp/passwd
  859. 110 echo 'ignacio:x:738202:89939:ignacio,,,:/fakehome/ignacio:/bin/sh' >> /tmp/passwd
  860. 111
  861. 112 rm /etc/passwd
  862. 113 mv /tmp/passwd /etc/passwd || warning 'Unable to change /etc/passwd. That may be a security risk.'
  863. 114
  864. 115 # Create password entry for container user in /etc/shadow
  865. 116 rm -v /etc/shadow || warning 'Cannot change /etc/shadow. That may be a security risk.'
  866. 117 echo "ignacio:sac19FwGGTx/A:17293:0:99999:7:::" > /etc/shadow
  867. 118 echo 'root:*:17219:0:99999:7:::' >> /etc/shadow
  868. 119
  869. 120 # Create user group entry (and delete possibly existing same gid)
  870. 121 cat /etc/group | grep -v ':89939:' > /tmp/group
  871. 122 echo "primarygroup:x:89939:" >> /tmp/group
  872. 123 mv /tmp/group /etc/group
  873. 124
  874. 125 # Create /etc/sudoers, delete /etc/sudoers.d. Overwrite possible sudo setups in image.
  875. 126 [ -e /etc/sudoers.d ] && rm -v -R /etc/sudoers.d
  876. 127 [ -e /etc/sudoers ] && rm -v /etc/sudoers
  877. 128 echo '# /etc/sudoers created by x11docker' > /etc/sudoers
  878. 129 echo 'root ALL=(ALL) ALL' >> /etc/sudoers
  879. 130
  880. 131 # Restrict PAM configuration of su and sudo
  881. 132 mkdir -p /etc/pam.d
  882. 133 [ -e /etc/pam.d/sudo ] && rm -v /etc/pam.d/sudo
  883. 134 case "$Containersystem" in
  884. 135 fedora)
  885. 136 echo '#%PAM-1.0' > /etc/pam.d/su
  886. 137 echo 'auth sufficient pam_rootok.so' >> /etc/pam.d/su
  887. 138 echo 'account sufficient pam_succeed_if.so uid = 0 use_uid quiet' >> /etc/pam.d/su
  888. 139 echo 'session include system-auth' >> /etc/pam.d/su
  889. 140 ;;
  890. 141 *)
  891. 142 echo '#%PAM-1.0' > /etc/pam.d/su
  892. 143 echo 'auth sufficient pam_rootok.so' >> /etc/pam.d/su # allow root to switch user without a password
  893. 144 echo '@include common-auth' >> /etc/pam.d/su
  894. 145 echo '@include common-account' >> /etc/pam.d/su
  895. 146 echo '@include common-session' >> /etc/pam.d/su
  896. 147 ;;
  897. 148 esac
  898. 149
  899. 150 # Set up container user groups
  900. 151 Groupname="video"
  901. 152 Groupid="44"
  902. 153 [ "$Groupname" ] || Groupname="$(cat /etc/group | grep "video" | cut -d: -f1)"
  903. 154 [ "$Groupid" ] || Groupid="$(cat /etc/group | grep "video" | cut -d: -f3)"
  904. 155 [ "$Groupname" ] && {
  905. 156 cat /etc/group | sed "s/^$Groupname.*/$Groupname:x:$Groupid:$(cat /etc/group | grep "$Groupname:.:" | cut -d: -f4 ),$Containeruser/" | sed 's/:,/:/' > /tmp/group
  906. 157 cat /etc/group | grep -q "$Groupname:.:" || echo "$Groupname:x:$Groupid:$Containeruser" >> /tmp/group
  907. 158 cp /tmp/group /etc/group
  908. 159 } || note 'Failed to add container user to group video.'
  909. 160
  910. 161 Groupname="render"
  911. 162 Groupid="108"
  912. 163 [ "$Groupname" ] || Groupname="$(cat /etc/group | grep "render" | cut -d: -f1)"
  913. 164 [ "$Groupid" ] || Groupid="$(cat /etc/group | grep "render" | cut -d: -f3)"
  914. 165 [ "$Groupname" ] && {
  915. 166 cat /etc/group | sed "s/^$Groupname.*/$Groupname:x:$Groupid:$(cat /etc/group | grep "$Groupname:.:" | cut -d: -f4 ),$Containeruser/" | sed 's/:,/:/' > /tmp/group
  916. 167 cat /etc/group | grep -q "$Groupname:.:" || echo "$Groupname:x:$Groupid:$Containeruser" >> /tmp/group
  917. 168 cp /tmp/group /etc/group
  918. 169 } || note 'Failed to add container user to group render.'
  919. 170
  920. 171 [ -e "$Containeruserhome" ] || {
  921. 172 # only create HOME here if capability CHOWN is allowed.
  922. 173 :>/tmp/chowntestfile
  923. 174 chown "$Containeruser" /tmp/chowntestfile && {
  924. 175 mkdir -v -p "$Containeruserhome"
  925. 176 chown "$Containeruser" "$Containeruserhome"
  926. 177 }
  927. 178 rm /tmp/chowntestfile
  928. 179 }
  929. 180
  930. 181 rocknroll || exit 64
  931. 182
  932. 183
  933. 184 # disable getty in inittab
  934. 185 [ -e /etc/inittab ] && sed -i 's/.*getty/##getty disabled by x11docker## \0/' /etc/inittab
  935. 186
  936. 187
  937. 188 rocknroll || exit 64
  938. 189
  939. 190 storeinfo containerrootrc=ready
  940. 191
  941.  
  942. x11docker[07:56:04,991]: Generated xinitrc:
  943. 1 #! /bin/sh
  944. 2 disable_xhost ()
  945. 3 {
  946. 4 local Line=;
  947. 5 command -v xhost > /dev/null || {
  948. 6 warning "Command 'xhost' not found.
  949. 7 Can not check for possibly allowed network access to X.
  950. 8 Please install 'xhost'.";
  951. 9 return 1
  952. 10 };
  953. 11 xhost 2>&1 | tail -n +2 /dev/stdin | while read -r Line; do
  954. 12 debugnote "xhost: Removing entry $Line";
  955. 13 xhost -$Line;
  956. 14 done;
  957. 15 xhost -;
  958. 16 [ "$(xhost 2>&1 | wc -l)" -gt "1" ] && {
  959. 17 warning "Remaining xhost permissions found on display ${DISPLAY:-}
  960. 18 $(xhost 2>&1 )";
  961. 19 return 1
  962. 20 };
  963. 21 xhost 2>&1 | grep "access control disabled" && {
  964. 22 warning "Failed to restrict xhost permissions.
  965. 23 Access to display ${DISPLAY:-} is allowed for everyone.";
  966. 24 return 1
  967. 25 };
  968. 26 return 0
  969. 27 }
  970. 28 pspid ()
  971. 29 {
  972. 30 LC_ALL=C ps -p "${1:-}" 2> /dev/null | grep -v 'TIME'
  973. 31 }
  974. 32 rocknroll ()
  975. 33 {
  976. 34 [ -s "$Timetosaygoodbyefile" ] && return 1;
  977. 35 [ -e "$Timetosaygoodbyefile" ] || return 1;
  978. 36 return 0
  979. 37 }
  980. 38 storeinfo ()
  981. 39 {
  982. 40 [ -e "$Storeinfofile" ] || return 1;
  983. 41 case "${1:-}" in
  984. 42 dump)
  985. 43 grep "^${2:-}=" $Storeinfofile | sed "s/^${2:-}=//"
  986. 44 ;;
  987. 45 drop)
  988. 46 sed -i "/^${2:-}=/d" $Storeinfofile
  989. 47 ;;
  990. 48 test)
  991. 49 grep -q "^${2:-}=" $Storeinfofile
  992. 50 ;;
  993. 51 *)
  994. 52 debugnote "storeinfo(): ${1:-}";
  995. 53 grep -q "^$(echo "${1:-}" | cut -d= -f1)=" $Storeinfofile && {
  996. 54 sed -i "/^$(echo "${1:-}" | cut -d= -f1)=/d" $Storeinfofile
  997. 55 };
  998. 56 echo "${1:-}" >> $Storeinfofile
  999. 57 ;;
  1000. 58 esac
  1001. 59 }
  1002. 60 storepid ()
  1003. 61 {
  1004. 62 case "${1:-}" in
  1005. 63 dump)
  1006. 64 grep -w "${2:-}" "$Storepidfile" | cut -d' ' -f1
  1007. 65 ;;
  1008. 66 test)
  1009. 67 grep -q -w "${2:-}" "$Storepidfile"
  1010. 68 ;;
  1011. 69 *)
  1012. 70 echo "${1:-NOPID}" "${2:-NONAME}" >> "$Storepidfile";
  1013. 71 debugnote "storepid(): Stored pid '${1:-}' of '${2:-}': $(pspid ${1:-} ||:)"
  1014. 72 ;;
  1015. 73 esac
  1016. 74 }
  1017. 75
  1018. 76 warning() {
  1019. 77 echo "$*:WARNING" | sed "s/\$/ /" >>$Messagefile
  1020. 78 }
  1021. 79 note() {
  1022. 80 echo "$*:NOTE" | sed "s/\$/ /" >>$Messagefile
  1023. 81 }
  1024. 82 verbose() {
  1025. 83 echo "$*:VERBOSE" | sed "s/\$/ /" >>$Messagefile
  1026. 84 }
  1027. 85 debugnote() {
  1028. 86 echo "$*:DEBUGNOTE" | sed "s/\$/ /" >>$Messagefile
  1029. 87 }
  1030. 88 error() {
  1031. 89 echo "$*:ERROR" | sed "s/\$/ /" >>$Messagefile
  1032. 90 exit 64
  1033. 91 }
  1034. 92 stdout() {
  1035. 93 echo "$*:STDOUT" | sed "s/\$/ /" >>$Messagefile
  1036. 94 }
  1037. 95 getscreensize() {
  1038. 96 CurrentXaxis="$(xrandr | grep primary | cut -d' ' -f4 | cut -dx -f1 )"
  1039. 97 CurrentYaxis="$(xrandr | grep primary | cut -d' ' -f4 | cut -dx -f2 | cut -d+ -f1)"
  1040. 98 }
  1041. 99 checkscreensize() {
  1042. 100 getscreensize
  1043. 101 [ "$Xaxis" = "$CurrentXaxis" ] || return 1
  1044. 102 [ "$Yaxis" = "$CurrentYaxis" ] || return 1
  1045. 103 return 0
  1046. 104 }
  1047. 105 getprimary() {
  1048. 106 xrandr | grep -q primary || xrandr --output $(xrandr | grep ' connected' | head -n1 | cut -d' ' -f1) --primary
  1049. 107 echo $(xrandr | grep primary | cut -d' ' -f1)
  1050. 108 }
  1051. 109
  1052. 110 Messagefile='/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/message.fifo'
  1053. 111 Output="$(getprimary)"
  1054. 112 Storeinfofile='/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/store.info'
  1055. 113 Storepidfile='/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/store.pids'
  1056. 114 Timetosaygoodbyefile='/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/timetosaygoodbye'
  1057. 115
  1058. 116 export PATH='/usr/local/buildtools/java/jdk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games'
  1059. 117 export DISPLAY=:0 XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client XSOCKET=/tmp/.X11-unix/X0 XDG_RUNTIME_DIR=/run/user/738202
  1060. 118
  1061. 119 Cookie=''
  1062. 120 Line=''
  1063. 121 Var=''
  1064. 122
  1065. 123 debugnote 'Running xinitrc'
  1066. 124
  1067. 125 # background color
  1068. 126
  1069. 127 # create new XAUTHORITY cookies
  1070. 128 :> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client
  1071. 129
  1072. 130 export XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/Xauthority.host.0
  1073. 131 xhost | grep -q 'SI:localuser:ignacio' || { xhost +SI:localuser:ignacio ; Xhostentry='yes' ; }
  1074. 132
  1075. 133 echo 'Requesting trusted cookie from X server'
  1076. 134 xauth -v -i -f /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client generate :0 . trusted timeout 3600
  1077. 135
  1078. 136 [ -s '/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client' ] || {
  1079. 137 [ 'trusted' = 'untrusted' ] && note 'Could not create untrusted cookie.
  1080. 138 Maybe your X server misses extension SECURITY.'
  1081. 139 [ 'trusted' = 'untrusted' ] && warning 'SECURITY RISK! Keylogging and remote host control
  1082. 140 may be possible! Better avoid using option --hostdisplay,
  1083. 141 rather use --xpra or --nxagent.'
  1084. 142 cp /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/Xauthority.host.0 /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client
  1085. 143 }
  1086. 144 [ -s '/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client' ] || {
  1087. 145 # still no cookie? try to create one without extension security
  1088. 146 debugnote 'xinitrc: Failed to retrieve trusted cookie from X server. Will bake one myself.'
  1089. 147 echo 'Failed to retrieve trusted cookie from X server. Will bake one myself.'
  1090. 148 xauth -v -i -f /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client add :0 . 2846f1c5695bee96fbe76f84d686a0bf
  1091. 149 ls -l /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client
  1092. 150 }
  1093. 151
  1094. 152 # Prepare cookie with localhost identification disabled by ffff, needed if X socket is shared. ffff means 'familiy wild'
  1095. 153 Cookie="$(xauth -i -f /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client nlist | sed -e 's/^..../ffff/')"
  1096. 154 echo "$Cookie" | xauth -v -i -f /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client nmerge -
  1097. 155
  1098. 156 debugnote "xinitrc: Created cookie: $(xauth -f /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client list 2>&1)"
  1099. 157 ls -l /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client
  1100. 158 cp /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/Xauthority.server
  1101. 159 chmod 644 /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client
  1102. 160
  1103. 161 [ -s '/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client' ] || warning 'Cookie creation failed!'
  1104. 162 [ '$Xhostentry' = 'yes' ] && env XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/Xauthority.host.0 xhost -SI:localuser:ignacio
  1105. 163 export XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client
  1106. 164 [ 'yes' = 'no' ] || [ ! -s '/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client' ] && unset XAUTHORITY && warning '--hostdisplay: X server :0 runs without cookie authentication.'
  1107. 165
  1108. 166 verbose "Output of xrandr on :0
  1109. 167 $(xrandr)"
  1110. 168
  1111. 169 echo 'xinitrc: xinitrc is ready'
  1112. 170 storeinfo xinitrc=ready
  1113. 171
  1114. 172 # wait for the end
  1115. 173 read Var </home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/timetosaygoodbye.fifo
  1116.  
  1117. DEBUGNOTE[07:56:05,015]: Running xtermrc: Ask for password if needed (no)
  1118. DEBUGNOTE[07:56:05,017]: storepid(): Stored pid '142834' of 'containershell': 142834 pts/6 00:00:00 bash
  1119. DEBUGNOTE[07:56:05,026]: waitforlogentry(): start_xserver(): Waiting for logentry "readyforX=ready" in store.info
  1120. DEBUGNOTE[07:56:05,029]: Running dockerrc: Setup as root or as user docker on host.
  1121.  
  1122. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log <==
  1123. WARNING: No swap limit support
  1124.  
  1125. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/message.log <==
  1126. DEBUGNOTE[07:56:05,143]: dockerrc: Found default Runtime: runc
  1127. DEBUGNOTE[07:56:05,158]: dockerrc: All Runtimes: nvidia runc
  1128. DEBUGNOTE[07:56:05,169]: dockerrc: Container Runtime: nvidia
  1129. DEBUGNOTE[07:56:05,181]: storeinfo(): runtime=nvidia
  1130. DEBUGNOTE[07:56:05,281]: dockerrc: Image CMD: /bin/sh -c /usr/lib/rstudio/bin/rstudio
  1131. DEBUGNOTE[07:56:05,294]: dockerrc: Image USER: developer
  1132. 1 #! /bin/sh
  1133. 2
  1134. 3 # containerrc
  1135. 4 # Created startscript for docker run used as container command.
  1136. 5 # Runs as unprivileged user in container.
  1137. 6
  1138. 7 exec 6>&1 7>&2
  1139. 8 exec >>/x11docker/container.log 2>&1
  1140. 9
  1141. 10 mysleep ()
  1142. 11 {
  1143. 12 sleep "${1:-1}" 2> /dev/null || sleep 1
  1144. 13 }
  1145. 14 rocknroll ()
  1146. 15 {
  1147. 16 [ -s "$Timetosaygoodbyefile" ] && return 1;
  1148. 17 [ -e "$Timetosaygoodbyefile" ] || return 1;
  1149. 18 return 0
  1150. 19 }
  1151. 20 saygoodbye ()
  1152. 21 {
  1153. 22 debugnote "time to say goodbye ($*)";
  1154. 23 [ -e "$Timetosaygoodbyefile" ] && echo timetosaygoodbye >> $Timetosaygoodbyefile;
  1155. 24 [ -e "$Timetosaygoodbyefifo" ] && echo timetosaygoodbye >> $Timetosaygoodbyefifo
  1156. 25 }
  1157. 26 storeinfo ()
  1158. 27 {
  1159. 28 [ -e "$Storeinfofile" ] || return 1;
  1160. 29 case "${1:-}" in
  1161. 30 dump)
  1162. 31 grep "^${2:-}=" $Storeinfofile | sed "s/^${2:-}=//"
  1163. 32 ;;
  1164. 33 drop)
  1165. 34 sed -i "/^${2:-}=/d" $Storeinfofile
  1166. 35 ;;
  1167. 36 test)
  1168. 37 grep -q "^${2:-}=" $Storeinfofile
  1169. 38 ;;
  1170. 39 *)
  1171. 40 debugnote "storeinfo(): ${1:-}";
  1172. 41 grep -q "^$(echo "${1:-}" | cut -d= -f1)=" $Storeinfofile && {
  1173. 42 sed -i "/^$(echo "${1:-}" | cut -d= -f1)=/d" $Storeinfofile
  1174. 43 };
  1175. 44 echo "${1:-}" >> $Storeinfofile
  1176. 45 ;;
  1177. 46 esac
  1178. 47 }
  1179. 48 waitforlogentry ()
  1180. 49 {
  1181. 50 local Startzeit Uhrzeit Dauer Count=0 Schlaf;
  1182. 51 local Errorkeys="${4:-}";
  1183. 52 local Warten="${5:-60}";
  1184. 53 Startzeit="$(date +%s ||:)";
  1185. 54 Startzeit="${Startzeit:-0}";
  1186. 55 [ "$Warten" = "infinity" ] && Warten=32000;
  1187. 56 debugnote "waitforlogentry(): ${1:-}: Waiting for logentry \"${3:-}\" in $(basename ${2:-})";
  1188. 57 while ! grep -q "${3:-}" < "${2:-}"; do
  1189. 58 Count="$(( $Count + 1 ))";
  1190. 59 Uhrzeit="$(date +%s ||:)";
  1191. 60 Uhrzeit="${Uhrzeit:-0}";
  1192. 61 Dauer="$(( $Uhrzeit - $Startzeit ))";
  1193. 62 Schlaf="$(( $Count / 10 ))";
  1194. 63 [ "$Schlaf" = "0" ] && Schlaf="0.5";
  1195. 64 mysleep "$Schlaf";
  1196. 65 [ "$Dauer" -gt "10" ] && debugnote "waitforlogentry(): ${1:-}: Waiting since ${Dauer}s for log entry \"${3:-}\" in $(basename ${2:-})";
  1197. 66 [ "$Dauer" -gt "$Warten" ] && error "waitforlogentry(): ${1:-}: Timeout waiting for log entry \"${3:-}\" in $(basename ${2:-})
  1198. 67 Last lines of logfile $(basename ${2:-}):
  1199. 68 $(tail "${2:-}")";
  1200. 69 [ "$Errorkeys" ] && grep -i -q -E "$Errorkeys" < "${2:-}" && error "waitforlogentry(): ${1:-}: Found error message in logfile.
  1201. 70 Last lines of logfile $(basename ${2:-}):
  1202. 71 $(tail "${2:-}")";
  1203. 72 rocknroll || {
  1204. 73 debugnote "waitforlogentry(): ${1:-}: Stopped waiting for ${3:-} in $(basename ${2:-}) due to terminating signal.";
  1205. 74 return 1
  1206. 75 };
  1207. 76 done;
  1208. 77 debugnote "waitforlogentry(): ${1:-}: Found log entry \"${3:-}\" in $(basename ${2:-}).";
  1209. 78 return 0
  1210. 79 }
  1211. 80 calculate() {
  1212. 81 LC_ALL=C printf %.3f\\n "$((10**9 * $@))e-9"
  1213. 82 }
  1214. 83
  1215. 84 warning() {
  1216. 85 echo "$*:WARNING" | sed "s/\$/ /" >>$Messagefile
  1217. 86 }
  1218. 87 note() {
  1219. 88 echo "$*:NOTE" | sed "s/\$/ /" >>$Messagefile
  1220. 89 }
  1221. 90 verbose() {
  1222. 91 echo "$*:VERBOSE" | sed "s/\$/ /" >>$Messagefile
  1223. 92 }
  1224. 93 debugnote() {
  1225. 94 echo "$*:DEBUGNOTE" | sed "s/\$/ /" >>$Messagefile
  1226. 95 }
  1227. 96 error() {
  1228. 97 echo "$*:ERROR" | sed "s/\$/ /" >>$Messagefile
  1229. 98 exit 64
  1230. 99 }
  1231. 100 stdout() {
  1232. 101 echo "$*:STDOUT" | sed "s/\$/ /" >>$Messagefile
  1233. 102 }
  1234. 103 Messagefile=/x11docker/message.fifo
  1235. 104 Storeinfofile=/x11docker/store.info
  1236. 105 Timetosaygoodbyefile=/x11docker/timetosaygoodbye
  1237. 106
  1238. 107 waitforlogentry containerrc $Storeinfofile containerrootrc=ready infinity
  1239. 108 debugnote "Running containerrc: Unprivileged user commands in container"
  1240. 109
  1241. 110 Containercommand="/bin/sh -c /usr/lib/rstudio/bin/rstudio"
  1242. 111 Entrypoint=""
  1243. 112
  1244. 113 verbose "containerrc: Container system:
  1245. 114 $(cat /etc/os-release 2>&1 ||:)"
  1246. 115
  1247. 116
  1248. 117 # USER and HOME
  1249. 118 Containeruser="$(storeinfo dump containeruser)"
  1250. 119 Containeruserhome="/fakehome/ignacio"
  1251. 120 export USER="$Containeruser"
  1252. 121 export HOME="$Containeruserhome"
  1253. 122
  1254. 123 # XDG_RUNTIME_DIR
  1255. 124 Containeruseruid=$(id -u $Containeruser)
  1256. 125 export XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR
  1257. 126 [ -e /run/user/$Containeruseruid ] && ln -s /run/user/$Containeruseruid $XDG_RUNTIME_DIR || mkdir -p -m700 $XDG_RUNTIME_DIR
  1258. 127
  1259. 128 mkdir -p $Containeruserhome
  1260. 129 # Copy files from /etc/skel into empty HOME
  1261. 130 [ -d /etc/skel ] && [ -z "$(ls -A "/fakehome/ignacio" 2>/dev/null | grep -v gnupg)" ] && {
  1262. 131 debugnote "containerrc: HOME is empty. Copying from /etc/skel"
  1263. 132 cp -n -R /etc/skel/. $Containeruserhome
  1264. 133 :
  1265. 134 } || {
  1266. 135 debugnote "containerrc: HOME not empty. Not copying from /etc/skel"
  1267. 136 }
  1268. 137
  1269. 138 # Create softlink to X unix socket
  1270. 139 [ -e /tmp/.X11-unix/X0 ] || ln -s /X0 /tmp/.X11-unix
  1271. 140
  1272. 141 unset WAYLAND_DISPLAY
  1273. 142
  1274. 143 export XDG_SESSION_TYPE=x11
  1275. 144
  1276. 145
  1277. 146 bash --version >/dev/null 2>&1 && export SHELL=/bin/bash || export SHELL=/bin/sh
  1278. 147 export TERM=xterm
  1279. 148 storeinfo test locale && export LANG="$(storeinfo dump locale)"
  1280. 149 [ -e "/usr/share/zoneinfo/America/Los_Angeles" ] || export TZ=UTC+08
  1281. 150 [ "$(date -Ihours)" != "2019-11-15T07-08:00" ] && export TZ=UTC+08
  1282. 151 [ "$DEBIAN_FRONTEND" = noninteractive ] && unset DEBIAN_FRONTEND && export DEBIAN_FRONTEND
  1283. 152 [ "$DEBIAN_FRONTEND" = newt ] && unset DEBIAN_FRONTEND && export DEBIAN_FRONTEND
  1284. 153 # container environment (--env)
  1285. 154 export 'container=docker'
  1286. 155 export 'XAUTHORITY=/x11docker/Xauthority.client'
  1287. 156 export 'DISPLAY=:0'
  1288. 157 export 'XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR'
  1289. 158
  1290. 159 env >> /x11docker/container.environment
  1291. 160 verbose "Container environment:
  1292. 161 $(env | sort)"
  1293. 162
  1294. 163 cd "$HOME"
  1295. 164 [ -d "/home/developer" ] && cd "/home/developer" # WORKDIR in image
  1296. 165
  1297. 166 debugnote "containerrc: Running container command:
  1298. 167 $Dbus /bin/sh -c /usr/lib/rstudio/bin/rstudio
  1299. 168 "
  1300. 169
  1301. 170 exec 1>&6 2>&7 6>&- 7>&-
  1302. 171 $Dbus /bin/sh -c /usr/lib/rstudio/bin/rstudio >>/x11docker/stdout 2>>/x11docker/stderr
  1303. 172 storeinfo cmdexitcode=$?
  1304. x11docker note: Found 'USER developer' in image.
  1305. If you want to run with user developer instead of host user ignacio,
  1306. than run with --user=RETAIN.
  1307.  
  1308. DEBUGNOTE[07:56:05,324]: storeinfo(): containeruser=ignacio
  1309. DEBUGNOTE[07:56:05,340]: dockerrc: Image ENTRYPOINT:
  1310. DEBUGNOTE[07:56:05,354]: dockerrc: Image WORKDIR: /home/developer
  1311. x11docker note: Found 'WORKDIR /home/developer' in image.
  1312. You can change it with option --workdir=DIR.
  1313.  
  1314. DEBUGNOTE[07:56:05,376]: storeinfo(): readyforX=ready
  1315. DEBUGNOTE[07:56:05,388]: waitforlogentry(): dockerrc: Waiting for logentry "xinitrc is ready" in xinit.log
  1316. DEBUGNOTE[07:56:05,543]: waitforlogentry(): start_xserver(): Found log entry "readyforX=ready" in store.info.
  1317.  
  1318. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/xinit.log <==
  1319. Requesting trusted cookie from X server
  1320. Ignoring locks on authority file /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client
  1321. authorization id is 1248
  1322. Ignoring locks and writing authority file /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client
  1323. Ignoring locks on authority file /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client
  1324. 1 entries read in: 0 new, 1 replacement
  1325. Ignoring locks and writing authority file /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client
  1326.  
  1327. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/message.log <==
  1328. DEBUGNOTE[07:56:05,585]: Running xinitrc
  1329.  
  1330. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/xinit.log <==
  1331. -rw------- 1 ignacio primarygroup 75 Nov 15 07:56 /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client
  1332.  
  1333. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/message.log <==
  1334. DEBUGNOTE[07:56:05,600]: xinitrc: Created cookie: #ffff#6d617274696e657a69672e73666f2e636f72702e676f6f676c652e636f6d#:0 MIT-MAGIC-COOKIE-1 55066642a1ee66acb6ef2a556c766716
  1335.  
  1336. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/xinit.log <==
  1337. xinitrc: xinitrc is ready
  1338.  
  1339. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/message.log <==
  1340. x11docker[07:56:05,692]: Output of xrandr on :0
  1341. Screen 0: minimum 8 x 8, current 3840 x 2160, maximum 32767 x 32767
  1342. DP-0 disconnected (normal left inverted right x axis y axis)
  1343. DP-1 disconnected (normal left inverted right x axis y axis)
  1344. DP-2 connected primary 3840x2160+0+0 (normal left inverted right x axis y axis) 708mm x 398mm
  1345. 3840x2160 60.00*+ 30.00
  1346. 2560x1440 59.95
  1347. 1920x2160 59.99
  1348. 1920x1200 59.88
  1349. 1920x1080 60.00 60.00 59.94 50.00
  1350. 1680x1050 59.95
  1351. 1600x900 60.00
  1352. 1440x900 59.89
  1353. 1440x576 50.00
  1354. 1440x480 59.94
  1355. 1280x1024 60.02
  1356. 1280x800 59.81
  1357. 1280x720 60.00 59.94 50.00
  1358. 1024x768 60.00
  1359. 800x600 60.32
  1360. 720x576 50.00
  1361. 720x480 59.94
  1362. 640x480 75.00 59.94 59.93
  1363. DP-3 disconnected (normal left inverted right x axis y axis)
  1364. DP-4 disconnected (normal left inverted right x axis y axis)
  1365. DP-5 disconnected (normal left inverted right x axis y axis)
  1366. DP-6 disconnected (normal left inverted right x axis y axis)
  1367. DP-7 disconnected (normal left inverted right x axis y axis)
  1368.  
  1369. DEBUGNOTE[07:56:05,707]: storeinfo(): xinitrc=ready
  1370. DEBUGNOTE[07:56:05,846]: waitforlogentry(): dockerrc: Found log entry "xinitrc is ready" in xinit.log.
  1371. DEBUGNOTE[07:56:06,412]: waitforlogentry(): containerrc: Waiting for logentry "containerrootrc=ready" in store.info
  1372. DEBUGNOTE[07:56:06,424]: storeinfo(): containerid=66327248d3615e71476cbb4b965905a97b73ab1620dcca316e8ff725ed7618f6
  1373. DEBUGNOTE[07:56:06,559]: dockerrc: Container is up and running.
  1374. DEBUGNOTE[07:56:06,603]: dockerrc: 1. check for PID 1: 143360
  1375. DEBUGNOTE[07:56:06,613]: storeinfo(): pid1pid=143360
  1376. DEBUGNOTE[07:56:06,657]: storeinfo(): containerip=192.168.9.2
  1377. DEBUGNOTE[07:56:06,908]: Running containerrootrc: Setup as root in container
  1378.  
  1379. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log <==
  1380. mkdir: created directory '/var/lib/dbus'
  1381. mkdir: created directory '/var/run/dbus'
  1382. mkdir: created directory '/tmp/.ICE-unix'
  1383. mkdir: created directory '/tmp/.X11-unix'
  1384. mkdir: created directory '/tmp/.font-unix'
  1385. srwxrwxrwx 1 root root 0 Nov 11 15:53 /X0
  1386. lrwxrwxrwx 1 root root 3 Nov 15 15:56 /tmp/.X11-unix/X0 -> /X0
  1387.  
  1388. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/message.log <==
  1389. DEBUGNOTE[07:56:06,926]: containerrootrc: Container libc: glibc
  1390.  
  1391. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log <==
  1392. mkdir: created directory '/fakehome'
  1393. removed '/etc/shadow'
  1394.  
  1395. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/message.log <==
  1396. x11docker[07:56:06,946]: Container system ID: ubuntu
  1397.  
  1398.  
  1399. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/container.log <==
  1400. chown: changing ownership of '/tmp/chowntestfile': Operation not permitted
  1401.  
  1402. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/message.log <==
  1403. DEBUGNOTE[07:56:06,983]: storeinfo(): containerrootrc=ready
  1404. DEBUGNOTE[07:56:07,019]: storeinfo(): dockerrc=ready
  1405. DEBUGNOTE[07:56:07,043]: storepid(): Stored pid '143925' of 'dockerstopshell': 143925 pts/6 00:00:00 bash
  1406. DEBUGNOTE[07:56:07,046]: waitforlogentry(): start_docker(): Waiting for logentry "dockerrc=ready" in store.info
  1407. DEBUGNOTE[07:56:07,053]: waitforlogentry(): start_docker(): Found log entry "dockerrc=ready" in store.info.
  1408. DEBUGNOTE[07:56:07,055]: storeinfo(): xtermrc=ready
  1409. DEBUGNOTE[07:56:07,060]: watchpidlist(): Setting pid 143360 on watchlist: pid1pid
  1410. DEBUGNOTE[07:56:07,080]: watchpidlist(): Watching pids:
  1411. 143360 pts/0 00:00:00 tini
  1412. DEBUGNOTE[07:56:07,083]: storepid(): Stored pid '143360' of 'pid1pid': 143360 pts/0 00:00:00 tini
  1413. DEBUGNOTE[07:56:07,197]: Process tree of container: (maybe not complete yet)
  1414. tini(143360)---sh(143418)---sleep(143806)
  1415. DEBUGNOTE[07:56:07,432]: waitforlogentry(): containerrc: Found log entry "containerrootrc=ready" in store.info.
  1416. DEBUGNOTE[07:56:07,438]: Process tree of x11docker:
  1417. bash(141478)-+-bash(141894)---tail(141897)
  1418. |-bash(141896)---sleep(144033)
  1419. |-bash(141898)---sleep(144032)
  1420. |-bash(141917)
  1421. |-bash(141931)
  1422. |-bash(142834)---bash(144037)---pstree(144038)
  1423. `-bash(143179)
  1424. Lost child of dockerrc (dockerstopshell):
  1425. bash(143925)
  1426. DEBUGNOTE[07:56:07,443]: storeinfo(): Stored info:
  1427. cache=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491
  1428. stdout=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/stdout
  1429. stderr=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/stderr
  1430. x11dockerpid=141478
  1431. xserver=--hostdisplay
  1432. DISPLAY=:0
  1433. XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client
  1434. XSOCKET=/tmp/.X11-unix/X0
  1435. XDG_RUNTIME_DIR=/run/user/738202
  1436. Xenv= DISPLAY=:0 XAUTHORITY=/home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/Xauthority.client XSOCKET=/tmp/.X11-unix/X0 XDG_RUNTIME_DIR=/run/user/738202
  1437. tini=/usr/bin/docker-init
  1438. containername=x11docker_X0_rstudioxhost-verse_33362576491
  1439. runtime=nvidia
  1440. containeruser=ignacio
  1441. readyforX=ready
  1442. xinitrc=ready
  1443. containerid=66327248d3615e71476cbb4b965905a97b73ab1620dcca316e8ff725ed7618f6
  1444. pid1pid=143360
  1445. containerip=192.168.9.2
  1446. containerrootrc=ready
  1447. dockerrc=ready
  1448. xtermrc=ready
  1449. DEBUGNOTE[07:56:07,443]: Running containerrc: Unprivileged user commands in container
  1450. DEBUGNOTE[07:56:07,448]: storepid(): Stored pids:
  1451. 141917 watchpidlist
  1452. 141931 watchmessagefifo
  1453. 142834 containershell
  1454. 143925 dockerstopshell
  1455. 143360 pid1pid
  1456. DEBUGNOTE[07:56:07,451]: storeinfo(): x11docker=ready
  1457. x11docker[07:56:07,481]: containerrc: Container system:
  1458. NAME="Ubuntu"
  1459. VERSION="18.04.3 LTS (Bionic Beaver)"
  1460. ID=ubuntu
  1461. ID_LIKE=debian
  1462. PRETTY_NAME="Ubuntu 18.04.3 LTS"
  1463. VERSION_ID="18.04"
  1464. HOME_URL="https://www.ubuntu.com/"
  1465. SUPPORT_URL="https://help.ubuntu.com/"
  1466. BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
  1467. PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
  1468. VERSION_CODENAME=bionic
  1469. UBUNTU_CODENAME=bionic
  1470.  
  1471. DEBUGNOTE[07:56:07,494]: containerrc: HOME is empty. Copying from /etc/skel
  1472. x11docker[07:56:07,547]: Container environment:
  1473. container=docker
  1474. DISPLAY=:0
  1475. HOME=/fakehome/ignacio
  1476. HOSTNAME=66327248d361
  1477. LANG=en_US.UTF-8
  1478. LC_ALL=en_US.UTF-8
  1479. PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  1480. PWD=/tmp
  1481. SHELL=/bin/bash
  1482. TERM=xterm
  1483. USER=ignacio
  1484. XAUTHORITY=/x11docker/Xauthority.client
  1485. XDG_RUNTIME_DIR=/tmp/XDG_RUNTIME_DIR
  1486. XDG_SESSION_TYPE=x11
  1487.  
  1488. DEBUGNOTE[07:56:07,565]: containerrc: Running container command:
  1489. /bin/sh -c /usr/lib/rstudio/bin/rstudio
  1490.  
  1491. DEBUGNOTE[07:56:07,607]: waitforlogentry(): tailstderr: Found log entry "x11docker=ready" in store.info.
  1492. DEBUGNOTE[07:56:07,610]: waitforlogentry(): tailstdout: Found log entry "x11docker=ready" in store.info.
  1493.  
  1494. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/share/stderr <==
  1495. libGL error: No matching fbConfigs or visuals found
  1496. libGL error: failed to load driver: swrast
  1497. WebEngineContext used before QtWebEngine::initialize() or OpenGL context creation failed.
  1498. Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize -1, greenBufferSize -1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DefaultSwapBehavior, swapInterval 1, colorSpace QSurfaceFormat::DefaultColorSpace, profile QSurfaceFormat::NoProfile)
  1499. Received signal 6
  1500. #0 0x7f0e60755a4f <unknown>
  1501. #1 0x7f0e60755e4b <unknown>
  1502. #2 0x7f0e607564ce <unknown>
  1503. #3 0x7f0e5b9be890 <unknown>
  1504. #4 0x7f0e59d33e97 gsignal
  1505. #5 0x7f0e59d35801 abort
  1506. #6 0x7f0e5bc50dcc QMessageLogger::fatal()
  1507. #7 0x7f0e5940fafc QQuickWidgetPrivate::handleContextCreationFailure()
  1508. #8 0x7f0e5940fcfa QQuickWidgetPrivate::createContext()
  1509. #9 0x7f0e59411e86 QQuickWidget::resizeEvent()
  1510. #10 0x7f0e65e3f98d QtWebEngineCore::RenderWidgetHostViewQtDelegateWidget::resizeEvent()
  1511. #11 0x7f0e5cdb4ea2 QWidget::event()
  1512. #12 0x7f0e59412acb QQuickWidget::event()
  1513. #13 0x7f0e65e3fc88 QtWebEngineCore::RenderWidgetHostViewQtDelegateWidget::event()
  1514. #14 0x7f0e5cd76b3c QApplicationPrivate::notify_helper()
  1515. #15 0x7f0e5cd7dd30 QApplication::notify()
  1516. #16 0x7f0e5be3de28 QCoreApplication::notifyInternal2()
  1517. #17 0x7f0e5cdad63d QWidgetPrivate::sendPendingMoveAndResizeEvents()
  1518. #18 0x7f0e5cdb11b3 QWidgetPrivate::show_helper()
  1519. #19 0x7f0e5cdb4375 QWidget::setVisible()
  1520. #20 0x7f0e5ec88fb6 QtWebEngineCore::WebContentsAdapter::initialize()
  1521. #21 0x7f0e5ec8b21e QtWebEngineCore::WebContentsAdapter::load()
  1522. #22 0x7f0e5ec8bb50 QtWebEngineCore::WebContentsAdapter::load()
  1523. #23 0x561d697d10ac rstudio::desktop::SessionLauncher::launchFirstSession()
  1524. #24 0x561d697d255b rstudio::desktop::SessionLauncher::onLaunchFirstSession()
  1525. #25 0x7f0e5be6a801 QObject::event()
  1526. #26 0x7f0e5cd76b3c QApplicationPrivate::notify_helper()
  1527. #27 0x7f0e5cd7dd30 QApplication::notify()
  1528. #28 0x7f0e5be3de28 QCoreApplication::notifyInternal2()
  1529. #29 0x7f0e5be40857 QCoreApplicationPrivate::sendPostedEvents()
  1530. #30 0x7f0e5be95bb3 postEventSourceDispatch()
  1531. #31 0x7f0e531b8417 g_main_context_dispatch
  1532. #32 0x7f0e531b8650 <unknown>
  1533. #33 0x7f0e531b86dc g_main_context_iteration
  1534. #34 0x7f0e5be951ef QEventDispatcherGlib::processEvents()
  1535. #35 0x7f0e5be3c78a QEventLoop::exec()
  1536. #36 0x7f0e5be45190 QCoreApplication::exec()
  1537. #37 0x561d69790a0f main
  1538. #38 0x7f0e59d16b97 __libc_start_main
  1539. #39 0x561d69793d8a _start
  1540. r8: 0000000000000000 r9: 00007ffe1b93c140 r10: 0000000000000008 r11: 0000000000000246
  1541. r12: 00007ffe1b93c470 r13: 0000561d6b165400 r14: 0000561d6b165400 r15: 00007ffe1b93c9e0
  1542. di: 0000000000000002 si: 00007ffe1b93c140 bp: 0000561d6b165400 bx: 00007f0e5bf60e80
  1543. dx: 0000000000000000 ax: 0000000000000000 cx: 00007f0e59d33e97 sp: 00007ffe1b93c140
  1544. ip: 00007f0e59d33e97 efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
  1545. trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
  1546. [end of stack trace]
  1547. Calling _exit(1). Core file will not be generated.
  1548.  
  1549. ==> /home/ignacio/.cache/x11docker/rstudioxhost-verse-33362576491/message.log <==
  1550. DEBUGNOTE[07:56:09,630]: storeinfo(): cmdexitcode=1
  1551. DEBUGNOTE[07:56:10,086]: watchpidlist(): PID 143360 has terminated
  1552. DEBUGNOTE[07:56:10,090]: time to say goodbye (watchpidlist 143360)
  1553. DEBUGNOTE[07:56:10,096]: time to say goodbye (watchpidlist)
  1554. DEBUGNOTE[07:56:10,097]: time to say goodbye (main)
  1555. DEBUGNOTE[07:56:10,102]: Terminating x11docker.
  1556. DEBUGNOTE[07:56:10,107]: time to say goodbye (finish)
  1557. DEBUGNOTE[07:56:10,143]: finish(): Checking pid 143360 (pid1pid): (already gone)
  1558. DEBUGNOTE[07:56:10,179]: finish(): Checking pid 143925 (dockerstopshell): 143925 pts/6 00:00:00 bash
  1559. DEBUGNOTE[07:56:10,216]: finish(): Checking pid 142834 (containershell): (already gone)
  1560. DEBUGNOTE[07:56:10,255]: finish(): Checking pid 141931 (watchmessagefifo): 141931 pts/6 00:00:00 bash
  1561. DEBUGNOTE[07:56:10,292]: finish(): Checking pid 141917 (watchpidlist): (already gone)
  1562. DEBUGNOTE[07:56:11,386]: termpid(): Terminating 141931 (watchmessagefifo): 141931 pts/6 00:00:00 bash
  1563. DEBUGNOTE[07:56:11,516]: x11docker exit code: 0
  1564. DEBUGNOTE[07:56:11,530]: CMD exit code: 1
Advertisement
Add Comment
Please, Sign In to add comment