nyanya commited on
Commit
8c26c56
1 Parent(s): f9144a0
Files changed (3) hide show
  1. Dockerfile +5 -22
  2. packages.txt +0 -1
  3. start_server.sh +1 -10
Dockerfile CHANGED
@@ -57,15 +57,6 @@ RUN curl -s https://api.github.com/repos/gitpod-io/openvscode-server/releases/la
57
  mkdir -p /app/openvscode-server && \
58
  tar -xzf /tmp/openvscode-server.tar.gz --strip-components=1 -C /app/openvscode-server
59
 
60
- # Fetch the latest version of Code Server
61
- RUN curl -s "https://api.github.com/repos/coder/code-server/releases/latest" \
62
- | grep "browser_download_url.*linux-amd64.tar.gz" \
63
- | cut -d : -f 2,3 \
64
- | tr -d \" \
65
- | wget -qi - -O /tmp/code-server.tar.gz && \
66
- mkdir -p /app/code-server && \
67
- tar -xzf /tmp/code-server.tar.gz -C /app/code-server --strip-components=1
68
-
69
  # Install Node.js and configurable-http-proxy
70
  RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \
71
  && apt-get install -y nodejs
@@ -84,18 +75,6 @@ ENV PATH="/usr/local/go/bin:${PATH}" \
84
  GOPATH="/go" \
85
  GOBIN="/go/bin"
86
 
87
- # Install VS Code
88
- RUN wget -q https://packages.microsoft.com/keys/microsoft.asc -O- | apt-key add - \
89
- && apt-get update \
90
- && apt-get install -y apt-transport-https \
91
- && echo "deb [arch=amd64] https://packages.microsoft.com/repos/vscode stable main" | tee /etc/apt/sources.list.d/vscode.list \
92
- && apt-get update \
93
- && apt-get install -y code \
94
- && rm -rf /var/cache/apt/* \
95
- && rm -rf /var/lib/apt/lists/* \
96
- && rm -rf /var/tmp/* \
97
- && rm -rf /tmp/*
98
-
99
  USER user
100
 
101
  # All users can use /home/user as their home directory
@@ -132,7 +111,11 @@ USER root
132
  RUN --mount=target=/root/packages.txt,source=packages.txt \
133
  apt-get update && \
134
  xargs -r -a /root/packages.txt apt-get install -y --no-install-recommends \
135
- && rm -rf /var/lib/apt/lists/*
 
 
 
 
136
 
137
  RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
138
  bash /root/on_startup.sh
 
57
  mkdir -p /app/openvscode-server && \
58
  tar -xzf /tmp/openvscode-server.tar.gz --strip-components=1 -C /app/openvscode-server
59
 
 
 
 
 
 
 
 
 
 
60
  # Install Node.js and configurable-http-proxy
61
  RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \
62
  && apt-get install -y nodejs
 
75
  GOPATH="/go" \
76
  GOBIN="/go/bin"
77
 
 
 
 
 
 
 
 
 
 
 
 
 
78
  USER user
79
 
80
  # All users can use /home/user as their home directory
 
111
  RUN --mount=target=/root/packages.txt,source=packages.txt \
112
  apt-get update && \
113
  xargs -r -a /root/packages.txt apt-get install -y --no-install-recommends \
114
+ && rm -rf /var/lib/apt/lists/* \
115
+ && rm -rf /var/cache/apt/* \
116
+ && rm -rf /var/lib/apt/lists/* \
117
+ && rm -rf /var/tmp/* \
118
+ && rm -rf /tmp/*
119
 
120
  RUN --mount=target=/root/on_startup.sh,source=on_startup.sh,readwrite \
121
  bash /root/on_startup.sh
packages.txt CHANGED
@@ -5,5 +5,4 @@ nginx
5
  autossh
6
  tmux
7
  ripgrep
8
- libsecret-1-dev
9
  lsof
 
5
  autossh
6
  tmux
7
  ripgrep
 
8
  lsof
start_server.sh CHANGED
@@ -1,18 +1,9 @@
1
  #!/bin/bash
2
 
3
- #nginx -t
4
- #service nginx start
5
-
6
  ssh -o StrictHostKeyChecking=no -R nya:80:localhost:8080 tunne.link -p8043 &
7
 
8
  echo "Starting VSCode Server..."
9
- #/app/openvscode-server/bin/openvscode-server --host 0.0.0.0 --port 8080 --without-connection-token "${@}" &
10
-
11
-
12
- /app/code-server/bin/code-server --bind-addr 0.0.0.0:7860 --auth none --proxy-domain cripp.link &
13
-
14
- #echo "Starting Code Tunnel..."
15
- #/usr/bin/code tunnel --accept-server-license-terms &
16
 
17
  # Sleep for a long time to keep the container running
18
  sleep infinity
 
1
  #!/bin/bash
2
 
 
 
 
3
  ssh -o StrictHostKeyChecking=no -R nya:80:localhost:8080 tunne.link -p8043 &
4
 
5
  echo "Starting VSCode Server..."
6
+ /app/openvscode-server/bin/openvscode-server --host 0.0.0.0 --port 8080 --without-connection-token "${@}" &
 
 
 
 
 
 
7
 
8
  # Sleep for a long time to keep the container running
9
  sleep infinity