Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit397972c

Browse files
committed
feat: add code-server app customization
1 parentfb15bd3 commit397972c

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

‎src/code-server/devcontainer-feature.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,22 @@
156156
"description":"Path to the workspace or folder to open on startup. Can be a directory or a .code-workspace file."
157157
}
158158
},
159+
"customizations": {
160+
"coder": {
161+
"apps": [
162+
{
163+
"slug":"code-server",
164+
"displayName":"code-server",
165+
"url":"http://${containerEnv:CODE_SERVER_HOST}:${containerEnv:CODE_SERVER_PORT}/${containerEnv:CODE_SERVER_WORKSPACE}",
166+
"openIn":"tab",
167+
"share":"owner",
168+
"icon":"/icons/web.svg",
169+
"order":1,
170+
"group":"Web Editors"
171+
}
172+
]
173+
}
174+
},
159175
"entrypoint":"/usr/local/bin/code-server-entrypoint",
160176
"dependsOn": {
161177
"ghcr.io/devcontainers/features/common-utils:2": {}

‎src/code-server/install.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ if [[ -n $WORKSPACE ]]; then
2222
CODE_SERVER_WORKSPACE="$WORKSPACE"
2323
fi
2424

25+
# Serialize these options in the container environment for reference in JSON.
26+
cat<<<EOF> /etc/environment
27+
CODE_SERVER_HOST=$HOST
28+
CODE_SERVER_PORT=$PORT
29+
CODE_SERVER_WORKSPACE=$CODE_SERVER_WORKSPACE
30+
EOF
31+
2532
FLAGS=()
2633
FLAGS+=(--auth"$AUTH")
2734
FLAGS+=(--bind-addr"$HOST:$PORT")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp