Skip to content

Commit f23844d

Browse files
committed
install with npm
1 parent 89645ca commit f23844d

File tree

4 files changed

+26
-6
lines changed

4 files changed

+26
-6
lines changed

Dockerfile

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,45 @@ RUN \
1414
echo "**** install dependencies ****" && \
1515
apt-get update && \
1616
apt-get install -y \
17+
gnupg && \
18+
curl -s https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - && \
19+
echo 'deb https://deb.nodesource.com/node_12.x bionic main' \
20+
> /etc/apt/sources.list.d/nodesource.list && \
21+
apt-get update && \
22+
apt-get install -y \
23+
build-essential \
1724
git \
1825
jq \
26+
libx11-dev \
27+
libxkbfile-dev \
28+
libsecret-1-dev \
1929
nano \
2030
net-tools \
31+
nodejs \
32+
pkg-config \
2133
sudo && \
2234
echo "**** install code-server ****" && \
2335
if [ -z ${CODE_RELEASE+x} ]; then \
2436
CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/cdr/code-server/releases/latest" \
2537
| awk '/tag_name/{print $4;exit}' FS='[""]'); \
2638
fi && \
27-
CODE_URL=$(curl -sX GET "https://api.github.com/repos/cdr/code-server/releases/tags/${CODE_RELEASE}" \
28-
| jq -r '.assets[] | select(.browser_download_url | contains("linux-amd64")) | .browser_download_url') && \
2939
mkdir -p /app/code-server && \
3040
curl -o \
3141
/tmp/code.tar.gz -L \
32-
"${CODE_URL}" && \
42+
"https://github.com/cdr/code-server/archive/${CODE_RELEASE}.tar.gz" && \
3343
tar xzf /tmp/code.tar.gz -C \
3444
/app/code-server --strip-components=1 && \
45+
cd /app/code-server && \
46+
npm install --unsafe-perm -g code-server && \
47+
npm prune --production && \
3548
echo "**** clean up ****" && \
49+
apt-get purge --auto-remove -y \
50+
build-essential \
51+
pkg-config \
52+
libx11-dev \
53+
libxkbfile-dev \
54+
libsecret-1-dev && \
55+
apt-get clean && \
3656
rm -rf \
3757
/tmp/* \
3858
/var/lib/apt/lists/* \

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
234234

235235
## Versions
236236

237-
* **17.05.20:** - Fixes for breaking changes in 3.3.0.
237+
* **17.05.20:** - Fixes for breaking changes in 3.3.0. Install with npm.
238238
* **29.04.20:** - Update start arguments.
239239
* **01.04.20:** - Structural changes required for v3.
240240
* **17.01.20:** - Fix artifact url retrieval from github.

readme-vars.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ app_setup_block: |
6565
6666
# changelog
6767
changelogs:
68-
- { date: "17.05.20:", desc: "Fixes for breaking changes in 3.3.0." }
68+
- { date: "17.05.20:", desc: "Fixes for breaking changes in 3.3.0. Install with npm." }
6969
- { date: "29.04.20:", desc: "Update start arguments." }
7070
- { date: "01.04.20:", desc: "Structural changes required for v3." }
7171
- { date: "17.01.20:", desc: "Fix artifact url retrieval from github." }

root/etc/services.d/code-server/run

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fi
99

1010
exec \
1111
s6-setuidgid abc \
12-
/app/code-server/bin/code-server \
12+
/usr/bin/code-server \
1313
--bind-addr 0.0.0.0:8443 \
1414
--user-data-dir /config/data \
1515
--extensions-dir /config/extensions \

0 commit comments

Comments
 (0)