File tree Expand file tree Collapse file tree 4 files changed +29
-1
lines changed Expand file tree Collapse file tree 4 files changed +29
-1
lines changed Original file line number Diff line number Diff line change 1+ .PHONY : test
2+ test :
3+ devcontainer features test
Original file line number Diff line number Diff line change 1717 code-server --install-extension " $extension "
1818done
1919
20+ if [ -n " $WORKSPACE " ]; then
21+ WORKSPACE=" $_REMOTE_USER_HOME "
22+ fi
23+
2024cat > /usr/local/bin/code-server-entrypoint \
2125<< EOF
2226#!/usr/bin/env bash
2327set -e
2428
25- su $_REMOTE_USER -c 'code-server --bind-addr "$HOST :$PORT " \$ ARGS'
29+ su $_REMOTE_USER -c 'code-server --bind-addr "$HOST :$PORT " \$ ARGS " $WORKSPACE " '
2630EOF
2731
2832chmod +x /usr/local/bin/code-server-entrypoint
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ # Optional: Import test library bundled with the devcontainer CLI
5+ source dev-container-features-test-lib
6+
7+ # Feature-specific tests
8+ check " code-server version" code-server --version
9+ check " code-server running" pgrep -f ' code-server/lib/node.*/code-server'
10+ check " code-server listening" lsof -i " @127.0.0.1:8080"
11+
12+ # Report results
13+ reportResults
Original file line number Diff line number Diff line change 3030 "version" : " 4.98.0"
3131 }
3232 }
33+ },
34+ "code-server-workspace" : {
35+ "image" : " mcr.microsoft.com/devcontainers/base:ubuntu" ,
36+ "features" : {
37+ "code-server" : {
38+ "workspace" : " /home"
39+ }
40+ }
3341 }
3442}
You can’t perform that action at this time.
0 commit comments