diff options
| author | crupest <crupest@outlook.com> | 2022-11-29 13:51:16 +0800 | 
|---|---|---|
| committer | crupest <crupest@outlook.com> | 2022-11-29 13:51:16 +0800 | 
| commit | b3c19d7442e398ca7806a43056ecd511b2d07ed9 (patch) | |
| tree | b8afffded4887b5bcfaf30cc48b4a6b9c86d3d42 /docker | |
| parent | fc435fee1a8d0b79de16b73a2b63afb1fe011398 (diff) | |
| download | crupest-b3c19d7442e398ca7806a43056ecd511b2d07ed9.tar.gz crupest-b3c19d7442e398ca7806a43056ecd511b2d07ed9.tar.bz2 crupest-b3c19d7442e398ca7806a43056ecd511b2d07ed9.zip | |
Try to fix code-server. v2.0
Diffstat (limited to 'docker')
| -rw-r--r-- | docker/code-server/Dockerfile | 6 | ||||
| -rwxr-xr-x | docker/code-server/install-code-server.bash | 8 | 
2 files changed, 11 insertions, 3 deletions
| diff --git a/docker/code-server/Dockerfile b/docker/code-server/Dockerfile index a5235c2..fe8785d 100644 --- a/docker/code-server/Dockerfile +++ b/docker/code-server/Dockerfile @@ -1,9 +1,9 @@ -FROM alpine:latest +FROM ubuntu:latest -RUN apk add --no-cache alpine-sdk bash libstdc++ libc6-compat python3 curl nodejs npm && npm install -g n -RUN n 16 && npm config set python python3 && npm install --global code-server --unsafe-perm  ENV CODE_SERVER_CONFIG="/data/code-server-config.yaml"  WORKDIR /root +COPY install-code-server.bash /install-code-server.bash  +RUN /install-code-server.bash  EXPOSE 8080  VOLUME [ "/data" ]  ENTRYPOINT [ "code-server", "--bind-addr", "0.0.0.0:8080" ] diff --git a/docker/code-server/install-code-server.bash b/docker/code-server/install-code-server.bash new file mode 100755 index 0000000..e9de30f --- /dev/null +++ b/docker/code-server/install-code-server.bash @@ -0,0 +1,8 @@ +#! /usr/bin/env bash + +set -e + +VERSION=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') + +curl -fOL "https://github.com/coder/code-server/releases/download/v${VERSION}/code-server_${VERSION}_amd64.deb" +dpkg -i "code-server_${VERSION}_amd64.deb" | 
