nyanya commited on
Commit
beb380a
·
1 Parent(s): 60f03ed

fix: dckfl

Browse files
Files changed (1) hide show
  1. Dockerfile +16 -11
Dockerfile CHANGED
@@ -62,18 +62,23 @@ RUN curl -s https://api.github.com/repos/gitpod-io/openvscode-server/releases/la
62
  && rm -rf /var/tmp/*
63
 
64
  # Fetch the latest version of OpenVSCode Server
65
- RUN curl -s https://api.github.com/repos/coder/code-server/releases/latest \
66
- | grep "browser_download_url.*linux-x64.tar.gz" \
 
67
  | cut -d : -f 2,3 \
68
- | tr -d \" \
69
- | wget -qi - -O /tmp/code-server.tar.gz && \
70
- # Install Code Server
71
- mkdir -p /app/code-server && \
72
- tar -xzf /tmp/code-server.tar.gz --strip-components=1 -C /app/code-server \
73
- # Clean up the temporary file
74
- && rm /tmp/code-server.tar.gz \
75
- && rm -rf /var/lib/apt/lists/* \
76
- && rm -rf /var/tmp/*
 
 
 
 
77
 
78
  # Install Node.js and configurable-http-proxy
79
  RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \
 
62
  && rm -rf /var/tmp/*
63
 
64
  # Fetch the latest version of OpenVSCode Server
65
+ RUN echo "**** install code-server ****" && \
66
+ CODE_RELEASE=$(curl -sX GET "https://api.github.com/repos/coder/code-server/releases/latest" \
67
+ | grep 'browser_download_url.*linux-x64.tar.gz"' \
68
  | cut -d : -f 2,3 \
69
+ | tr -d \") && \
70
+ mkdir -p /app/code-server && \
71
+ curl -o \
72
+ /tmp/code-server.tar.gz -L \
73
+ "$CODE_RELEASE" && \
74
+ tar xf /tmp/code-server.tar.gz -C \
75
+ /app/code-server --strip-components=1 && \
76
+ echo "**** clean up ****" && \
77
+ apt-get clean && \
78
+ rm -rf \
79
+ /tmp/* \
80
+ /var/lib/apt/lists/* \
81
+ /var/tmp/*
82
 
83
  # Install Node.js and configurable-http-proxy
84
  RUN curl -sL https://deb.nodesource.com/setup_16.x | bash - \