forked from coder/code-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sh
executable file
·47 lines (35 loc) · 1.22 KB
/
build.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# Build a Golden Helix docker image for code-server with changes to support App Streaming on VSWarehouse
# Follow the directions under [CONTRIBUTING.md](docs/CONTRIBUTING.md) to build the image
# git submodule update --init
# quilt push -a
# npm install
# npm run build
# VERSION=4.96.2 npm run build:vscode
# npm run release
# VERSION=4.96.2 npm run package
# cd release
# npm install --omit=dev
# cd ..
# npm run release:standalone
# Add "code" as symlink
cd release-standalone/lib/vscode/bin/remote-cli/
ln -f -s code-linux.sh code
cd ../../../../../
export VERSION=4.96.2
# Ensure we're in the correct directory
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
cd "$SCRIPT_DIR"
# Temporarily move the bundled node out of the way
if [ -f "release-standalone/lib/node" ]; then
mv release-standalone/lib/node ./node
fi
echo "PWD: $PWD"
docker build --no-cache \
-t registry.goldenhelix.com/public/code-server:${VERSION} .
# Move the bundled node back
if [ -f "./node" ]; then
mv ./node release-standalone/lib/node
fi
# Run like
# docker run -it -p 8081:8080 -e PASSWORD=your_secure_password123 -e PORT=8080 -e IDLE_TIMEOUT=2 registry.goldenhelix.com/gh/code-server:4.96.2 /home/ghuser/Workspace/