File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load diff This file was deleted.
Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22set -euo pipefail
33
4- # Opens an interactive bash session inside of a docker container
5- # for improved isolation during development.
6- # If the container exists it is restarted if necessary, then reused.
7-
84main () {
9- cd " $( dirname " ${0} " ) /../../.."
10-
11- local container_name=code-server-dev
12-
13- if docker inspect $container_name & > /dev/null; then
14- echo " -- Starting container"
15- docker start " $container_name " > /dev/null
16-
17- enter
18- exit 0
19- fi
20-
21- build
22- run
23- enter
24- }
25-
26- enter () {
27- echo " --- Entering $container_name "
28- docker exec -it " $container_name " /bin/bash
29- }
5+ cd " $( dirname " $0 " ) /../../.."
6+ source ./ci/lib.sh
307
31- run () {
32- echo " --- Spawning $container_name "
338 docker run \
349 -it \
35- --name $container_name \
36- " -v= $PWD :/code-server " \
37- " -w=/code-server " \
38- " -p= 127.0.0.1:8080:8080" \
39- $( if [[ -t 0 ]] ; then echo -it ; fi ) \
40- " $container_name "
10+ --rm \
11+ -v " $PWD :/src " \
12+ -w /src \
13+ -p 127.0.0.1:8080:8080 \
14+ " $( docker_build ./ci/images/debian8 ) " \
15+ " $@ "
4116}
4217
43- build () {
44- echo " --- Building $container_name "
45- docker build -t $container_name ./ci/dev/image > /dev/null
18+ docker_build () {
19+ docker build " $@ " >&2
20+ docker build -q " $@ "
4621}
4722
4823main " $@ "
Original file line number Diff line number Diff line change @@ -46,14 +46,12 @@ yarn watch
4646To develop inside of an isolated docker container:
4747
4848``` shell
49- ./ci/dev/image/exec.sh
50-
51- root@12345:/code-server# yarn
52- root@12345:/code-server# yarn vscode
53- root@12345:/code-server# yarn watch
49+ ./ci/dev/image/exec.sh yarn
50+ ./ci/dev/image/exec.sh yarn vscode
51+ ./ci/dev/image/exec.sh yarn watch
5452```
5553
56- Any changes made to the source will be live reloaded .
54+ ` yarn watch ` will live reload changes to the source .
5755
5856If changes are made to the patch and you've built previously you must manually
5957reset VS Code then run ` yarn vscode:patch ` .
7876Build release packages (make sure you run ` ./ci/steps/release.sh ` first):
7977
8078```
81- ./ci/steps/release-packages.sh
79+ ./ci/dev/image/exec.sh ./ci/ steps/release-packages.sh
8280# The standalone release is in ./release-standalone
8381# .deb, .rpm and the standalone archive are in ./release-packages
8482```
You can’t perform that action at this time.
0 commit comments