|
1 | 1 | { |
2 | 2 | "name": "${localWorkspaceFolderBasename}", |
3 | 3 | "build": { |
4 | | - "dockerfile": "../Containerfile.app", |
| 4 | + "dockerfile": "../Containerfile.tools", |
5 | 5 | "args": { |
6 | 6 | "USERNAME": "${localEnv:USER}" |
7 | 7 | } |
8 | 8 | }, |
9 | 9 | "remoteUser": "${localEnv:USER}", |
10 | 10 | "updateRemoteUserUID": true, |
11 | 11 | "shutdownAction": "stopContainer", |
12 | | - "initializeCommand": ".devcontainer/init-ssh-agent.sh", |
| 12 | + "initializeCommand": "sh -c '.devcontainer/init-ssh-agent.sh && .devcontainer/init-adb.sh'", |
13 | 13 | "runArgs": [ |
14 | 14 | "--name", |
15 | 15 | "${localWorkspaceFolderBasename}", |
16 | 16 | "--hostname", |
17 | 17 | "bull", |
18 | 18 | "--memory=8g", |
| 19 | + "--device=/dev/dri", |
| 20 | + "--dns", |
| 21 | + "1.1.1.1", |
| 22 | + "--dns", |
| 23 | + "9.9.9.9", |
19 | 24 | "--security-opt", |
20 | 25 | "label=disable" |
21 | 26 | ], |
22 | 27 | "mounts": [ |
23 | | - "source=${localEnv:HOME}/.ssh,target=/home/${localEnv:USER}/.ssh,type=bind,consistency=cached", |
24 | | - "source=/tmp/ssh-agent.sock,target=/ssh-agent,type=bind,consistency=cached", |
25 | | - "source=${localEnv:HOME}/.gitconfig,target=/home/${localEnv:USER}/.gitconfig,type=bind,consistency=cached" |
| 28 | + "source=${localEnv:HOME}/.ssh,target=/home/${localEnv:USER}/.ssh,type=bind,consistency=cached,readonly", |
| 29 | + "source=${localEnv:HOME}/.ssh-agent-devcontainer.sock,target=/ssh-agent,type=bind,consistency=cached", |
| 30 | + "source=${localEnv:HOME}/.gitconfig,target=/home/${localEnv:USER}/.gitconfig,type=bind,consistency=cached", |
| 31 | + "source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached", |
| 32 | + "source=/tmp/wayland.sock,target=/tmp/wayland.sock,type=bind,consistency=cached", |
| 33 | + "source=${localWorkspaceFolderBasename}-bash-history,target=/home/${localEnv:USER}/.history,type=volume", |
| 34 | + "source=${localWorkspaceFolderBasename}-keyrings,target=/home/${localEnv:USER}/.local/share/keyrings,type=volume" |
26 | 35 | ], |
27 | 36 | "containerEnv": { |
28 | | - "SSH_AUTH_SOCK": "/ssh-agent" |
| 37 | + "SSH_AUTH_SOCK": "/ssh-agent", |
| 38 | + "ADB_SERVER_SOCKET": "tcp:host.containers.internal:5037", |
| 39 | + "DISPLAY": "${localEnv:DISPLAY}", |
| 40 | + "XDG_RUNTIME_DIR": "/tmp", |
| 41 | + "WAYLAND_DISPLAY": "wayland.sock", |
| 42 | + "GDK_BACKEND": "wayland,x11", |
| 43 | + "DBUS_SESSION_BUS_ADDRESS": "unix:path=/tmp/dbus-session.sock" |
29 | 44 | }, |
30 | | - "postStartCommand": "sudo chown -R --no-dereference ${localEnv:USER}:${localEnv:USER} /home/${localEnv:USER}/.ssh || true; chmod 700 /home/${localEnv:USER}/.ssh; find /home/${localEnv:USER}/.ssh -maxdepth 1 -type f -exec chmod 600 {} + 2>/dev/null || true" |
| 45 | + "postCreateCommand": "sudo chown -R ${localEnv:USER}:${localEnv:USER} /home/${localEnv:USER}/.local /home/${localEnv:USER}/.history && touch /home/${localEnv:USER}/.history/bash_history", |
| 46 | + "postStartCommand": ".devcontainer/init-keyring.sh" |
31 | 47 | } |
0 commit comments