File tree 3 files changed +62
-0
lines changed
3 files changed +62
-0
lines changed Original file line number Diff line number Diff line change
1
+ FROM node:12
2
+
3
+ RUN apt-get update && \
4
+ apt-get install -y curl iproute2 vim libgpgme-dev libdevmapper-dev iptables net-tools libsecret-1-dev libx11-dev libxkbfile-dev libxkbfile-dev
5
+
6
+ CMD ["/bin/bash" ]
Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ yarn vscode
10
10
yarn watch # Visit http://localhost:8080 once completed.
11
11
```
12
12
13
+ To develop inside of an isolated docker container:
14
+
15
+ ``` shell
16
+ ./m bash -c ' yarn && yarn vscode && yarn watch' # Visit http://localhost:8080 once completed.
17
+ ```
18
+
13
19
Any changes made to the source will be live reloaded.
14
20
15
21
If changes are made to the patch and you've built previously you must manually
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -euo pipefail
4
+ cd " $( dirname " $0 " ) "
5
+
6
+ # Ensure submodules are cloned and up to date.
7
+ git submodule update --init
8
+
9
+ container_name=code-server-dev
10
+
11
+ # Docker build is very verbose even when everything is cached.
12
+ echo " --- Building $container_name "
13
+ docker build -t $container_name -f ./ci/dev.Dockerfile . > /dev/null
14
+
15
+ set +e
16
+ container_id=$( docker container inspect --format=" {{.Id}}" $container_name 2> /dev/null)
17
+
18
+ if [ $? -eq " 0" ]; then
19
+ echo " --- Killing $container_name "
20
+ docker rm -f $container_name 2> /dev/null
21
+ fi
22
+ set -e
23
+
24
+ echo " --- Spawning $container_name "
25
+ container_id=$( docker run \
26
+ -it \
27
+ --privileged \
28
+ --name $container_name \
29
+ " -v=$PWD :/code-server" \
30
+ " -w=/code-server" \
31
+ " -p=8080:8080" \
32
+ $( [[ -t 0 ]] && echo -it || true) \
33
+ -d \
34
+ $container_name )
35
+
36
+ set +e
37
+
38
+ echo " --- Executing: $@ "
39
+
40
+ CMD=" $@ "
41
+
42
+ docker exec \
43
+ $( [[ -t 0 ]] && echo -it || true) \
44
+ $container_id \
45
+ sh -c " $CMD "
46
+
47
+ docker exec \
48
+ $( [[ -t 0 ]] && echo -it || true) \
49
+ $container_id \
50
+ bash
You can’t perform that action at this time.
0 commit comments