|
2 | 2 | "name": "Development environments on your infrastructure",
|
3 | 3 | "image": "codercom/oss-dogfood:latest",
|
4 | 4 | "features": {
|
5 |
| - // See all possible options here https://github.com/devcontainers/features/tree/main/src/docker-in-docker |
6 | 5 | "ghcr.io/devcontainers/features/docker-in-docker:2": {
|
7 | 6 | "moby": "false"
|
8 | 7 | },
|
9 | 8 | "ghcr.io/coder/devcontainer-features/code-server:1": {
|
10 | 9 | "auth": "none",
|
11 | 10 | "port": 13337
|
12 | 11 | },
|
13 |
| - "./filebrowser": {} |
| 12 | + "./filebrowser": { |
| 13 | + "folder": "${containerWorkspaceFolder}" |
| 14 | + } |
14 | 15 | },
|
15 | 16 | // SYS_PTRACE to enable go debugging
|
16 | 17 | "runArgs": ["--cap-add=SYS_PTRACE"],
|
|
43 | 44 | "external": true,
|
44 | 45 | "icon": "/icon/zed.svg",
|
45 | 46 | "order": 5
|
| 47 | + }, |
| 48 | + // Reproduce `code-server` app here from the code-server |
| 49 | + // feature so that we can set the correct folder and order. |
| 50 | + // Currently, the order cannot be specified via option because |
| 51 | + // we parse it as a number whereas variable interpolation |
| 52 | + // results in a string. Additionally we set health check which |
| 53 | + // is not yet set in the feature. |
| 54 | + { |
| 55 | + "slug": "code-server", |
| 56 | + "displayName": "code-server", |
| 57 | + "url": "http://${localEnv:FEATURE_CODE_SERVER_OPTION_HOST:127.0.0.1}:${localEnv:FEATURE_CODE_SERVER_OPTION_PORT:8080}/?folder=${containerWorkspaceFolder}", |
| 58 | + "openIn": "${localEnv:FEATURE_CODE_SERVER_OPTION_APPOPENIN:slim-window}", |
| 59 | + "share": "${localEnv:FEATURE_CODE_SERVER_OPTION_APPSHARE:owner}", |
| 60 | + "icon": "/icon/code.svg", |
| 61 | + "group": "${localEnv:FEATURE_CODE_SERVER_OPTION_APPGROUP:Web Editors}", |
| 62 | + "order": 3, |
| 63 | + "healthCheck": { |
| 64 | + "url": "http://${localEnv:FEATURE_CODE_SERVER_OPTION_HOST:127.0.0.1}:${localEnv:FEATURE_CODE_SERVER_OPTION_PORT:8080}/healthz", |
| 65 | + "interval": 5, |
| 66 | + "threshold": 2 |
| 67 | + } |
46 | 68 | }
|
47 | 69 | ]
|
48 | 70 | }
|
49 | 71 | },
|
50 | 72 | "mounts": [
|
| 73 | + // Add a volume for the Coder home directory to persist shell history, |
| 74 | + // and speed up dotfiles init and/or personalization. |
| 75 | + "source=coder-coder-devcontainer-home,target=/home/coder,type=volume", |
51 | 76 | // Mount the entire home because conditional mounts are not supported.
|
52 | 77 | // See: https://github.com/devcontainers/spec/issues/132
|
53 | 78 | "source=${localEnv:HOME},target=/mnt/home/coder,type=bind,readonly"
|
54 | 79 | ],
|
55 |
| - "postCreateCommand": "./.devcontainer/postCreateCommand.sh", |
56 |
| - "postStartCommand": "sudo service docker start" |
| 80 | + "postCreateCommand": ["./.devcontainer/scripts/post_create.sh"], |
| 81 | + "postStartCommand": ["./.devcontainer/scripts/post_start.sh"] |
57 | 82 | }
|
0 commit comments