1- FROM ubuntu:20.04
1+ FROM debian:10
22
3- LABEL AboutImage "Ubuntu20.04_VS -Code-Server"
3+ LABEL AboutImage "debian:10_VS -Code-Server"
44
55LABEL Maintainer "Apoorv Vyavahare <apoorvvyavahare@pm.me>"
66
7- ARG DEBIAN_FRONTEND=noninteractive
87
98# Code-Server Version
10- ENV CS_VERSION=3.10.2 \
9+ ENV CS_VERSION=3.11.0 \
1110# Code-Server login type: {password, none}
1211 AUTH_TYPE="password" \
1312# Code-Server login password (If AUTH_TYPE=password)
@@ -23,85 +22,88 @@ ENV CS_VERSION=3.10.2 \
2322# Ngrok Port Forwarder Token
2423 NGROK_TOKEN="1tLI5XxmWy9UHmolHDVvxmgOwvU_4qG9dbxDayGJSyuEiq3A1" \
2524# System Path Variable
26- PATH=$PATH":/usr/local/go/bin" \
25+ PATH=/usr/local/go/bin:/usr/local/cargo/bin:$PATH \
26+ RUSTUP_HOME=/usr/local/rustup \
27+ CARGO_HOME=/usr/local/cargo \
2728# Timezone
2829 TZ="Asia/Kolkata" \
2930# Locales
3031 LANG=en_US.UTF-8 \
3132 LANGUAGE=en_US.UTF-8 \
3233 LC_ALL=C.UTF-8
33- RUN rm -rf /etc/apt/sources.list && \
34- # All Official Focal Repos
35- bash -c 'echo -e "deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse\n deb-src http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse\n deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse\n deb-src http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse\n deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse\n deb-src http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse\n deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse\n deb-src http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse\n deb http://archive.canonical.com/ubuntu focal partner\n deb-src http://archive.canonical.com/ubuntu focal partner" >/etc/apt/sources.list' && \
36- rm /bin/sh && ln -s /bin/bash /bin/sh && \
37- apt-get update && \
38- apt-get install -y \
39- # Base Packages
34+
35+ RUN apt-get update \
36+ && apt-get install -y \
37+ # Base Packages
4038 tzdata software-properties-common apt-transport-https wget git curl vim nano zip sudo net-tools xvfb php npm supervisor gnupg \
41- # C, C++
39+ # C, C++
4240 build-essential \
43- # C-Sharp
41+ # C-Sharp
4442 mono-complete \
45- # Clojure
43+ # Clojure
4644 clojure \
47- # Java
45+ # Java
4846 default-jre \
4947 default-jdk \
50- # Lua
48+ # Lua
5149 lua5.3 \
52- # Perl
50+ # Perl
5351 perl \
5452 perl6 \
55- # Python
53+ # Python
5654 python3 \
5755 python3-pip \
58- python-is-python3 \
59- # R
56+ # R
6057 r-base \
61- # Ruby
62- ruby && \
63- # Scala
64- wget https://www.scala-lang.org/files/archive/scala-2.13.6.deb -P /tmp && \
65- apt install -y /tmp/scala-2.13.6.deb && \
66- # Yarn
67- npm install --global yarn && \
68- # Go
69- bash -c 'echo "Installing Go..."' && \
70- wget https://golang.org/dl/go1.16.4.linux-amd64.tar.gz -P /tmp && \
71- tar -zxvf /tmp/go1.16.4.linux-amd64.tar.gz -C /tmp > /dev/null 2>&1 && \
72- cp -r /tmp/go/ /usr/local && \
73- bash -c 'echo "Go Installed!"' && \
74- # Nodejs(LTS Release)
75- bash -c 'echo "Installing Nodejs..."' && \
76- wget https://nodejs.org/dist/v14.17.0/node-v14.17.0-linux-x64.tar.xz -P /tmp && \
77- tar -xvf /tmp/node-v14.17.0-linux-x64.tar.xz -C /tmp > /dev/null 2>&1 && \
78- cp -r /tmp/node-v14.17.0-linux-x64/* /usr && \
79- bash -c 'echo "Installed Nodejs!"' && \
80- # PowerShell
81- wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -P /tmp && \
82- dpkg -i /tmp/packages-microsoft-prod.deb && \
83- apt-get update && \
84- apt-get install -y powershell && \
85- # Swift
86- bash -c 'echo "Installing Swift..."' && \
87- wget https://swift.org/builds/swift-5.4.1-release/ubuntu2004/swift-5.4.1-RELEASE/swift-5.4.1-RELEASE-ubuntu20.04.tar.gz -P /tmp && \
88- tar -zxvf /tmp/swift-5.4.1-RELEASE-ubuntu20.04.tar.gz -C /tmp > /dev/null 2>&1 && \
89- cp -r /tmp/swift-5.4.1-RELEASE-ubuntu20.04/usr/* /usr && \
90- bash -c 'echo "Swift Installed!"' && \
91- # Brave
92- curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg && \
93- echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" |tee /etc/apt/sources.list.d/brave-browser-release.list && \
94- apt update && \
95- apt install brave-browser -y && \
96- # Code-Server
97- bash -c 'echo -e "Installing Code-Server..."' && \
98- yarn --verbose --frozen-lockfile global add code-server@$CS_VERSION && \
99- yarn cache clean && \
100- bash -c 'echo -e "Code-Server Installed!"' && \
101- # Code-Server Extensions
102- wget https://github.com/microsoft/vscode-cpptools/releases/download/1.3.1/cpptools-linux.vsix -P /tmp && \
103- code-server --install-extension /tmp/cpptools-linux.vsix --extensions-dir $CUSTOM_HOME/.extensions && \
104- for codextension in \
58+ # Ruby
59+ ruby \
60+ # Scala
61+ && wget https://www.scala-lang.org/files/archive/scala-2.13.6.deb -P /tmp \
62+ && apt install -y /tmp/scala-2.13.6.deb \
63+ # Yarn
64+ && npm install --global yarn \
65+ # Go
66+ && bash -c 'echo "Installing Go..."' \
67+ && wget https://golang.org/dl/go1.16.4.linux-amd64.tar.gz -P /tmp \
68+ && tar -zxvf /tmp/go1.16.4.linux-amd64.tar.gz -C /tmp > /dev/null 2>&1 \
69+ && cp -r /tmp/go/ /usr/local \
70+ && bash -c 'echo "Go Installed!"' \
71+ # rust
72+ && curl https://sh.rustup.rs -sSf | sh -s -- -y \
73+ && sudo chmod -R a+w $RUSTUP_HOME $CARGO_HOME \
74+ && cargo --version \
75+ # Nodejs(LTS Release)
76+ && bash -c 'echo "Installing Nodejs..."' \
77+ && wget https://nodejs.org/dist/v14.17.0/node-v14.17.0-linux-x64.tar.xz -P /tmp \
78+ && tar -xvf /tmp/node-v14.17.0-linux-x64.tar.xz -C /tmp > /dev/null 2>&1 \
79+ && cp -r /tmp/node-v14.17.0-linux-x64/* /usr \
80+ && bash -c 'echo "Installed Nodejs!"' \
81+ # PowerShell
82+ && wget -q https://packages.microsoft.com/config/debian/10/packages-microsoft-prod.deb -P /tmp \
83+ && apt install -y /tmp/packages-microsoft-prod.deb \
84+ && apt-get update \
85+ && apt-get install -y powershell \
86+ # Swift
87+ && bash -c 'echo "Installing Swift..."' \
88+ && wget https://swift.org/builds/swift-5.4.1-release/ubuntu2004/swift-5.4.1-RELEASE/swift-5.4.1-RELEASE-ubuntu20.04.tar.gz -P /tmp \
89+ && tar -zxvf /tmp/swift-5.4.1-RELEASE-ubuntu20.04.tar.gz -C /tmp > /dev/null 2>&1 \
90+ && cp -r /tmp/swift-5.4.1-RELEASE-ubuntu20.04/usr/* /usr \
91+ && bash -c 'echo "Swift Installed!"' \
92+ # Brave
93+ && curl -fsSLo /usr/share/keyrings/brave-browser-archive-keyring.gpg https://brave-browser-apt-release.s3.brave.com/brave-browser-archive-keyring.gpg \
94+ && echo "deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg arch=amd64] https://brave-browser-apt-release.s3.brave.com/ stable main" |tee /etc/apt/sources.list.d/brave-browser-release.list \
95+ && apt update \
96+ && apt install brave-browser -y \
97+ # Code-Server
98+ && bash -c 'echo -e "Installing Code-Server..."' \
99+ && ARCH=$(dpkg --print-architecture) \
100+ && wget -O /tmp/code-server.deb "https://github.com/cdr/code-server/releases/download/v${CS_VERSION}/code-server_${CS_VERSION}_${ARCH}.deb" \
101+ && apt install -y /tmp/code-server.deb \
102+ && bash -c 'echo -e "Code-Server Installed!"' \
103+ # Code-Server Extensions
104+ && wget https://github.com/microsoft/vscode-cpptools/releases/download/1.3.1/cpptools-linux.vsix -P /tmp \
105+ && code-server --install-extension /tmp/cpptools-linux.vsix --extensions-dir $CUSTOM_HOME/.extensions \
106+ && for codextension in \
105107 pkief.material-icon-theme \
106108 akamud.vscode-theme-onedark \
107109 ms-python.python \
@@ -115,30 +117,29 @@ RUN rm -rf /etc/apt/sources.list && \
115117 ms-vscode.powershell \
116118 daltonjorge.scala \
117119 auchenberg.vscode-browser-preview \
118- ; do code-server --install-extension $codextension --extensions-dir $CUSTOM_HOME/.extensions; done && \
119- # Jupyter Prerequisites
120- pip install -U pylint ipykernel && \
121- # Cleanup
122- apt-get clean && \
123- rm -rf \
120+ rust-lang.rust \
121+ ; do code-server --install-extension $codextension --extensions-dir $CUSTOM_HOME/.extensions; done \
122+ # Jupyter Prerequisites
123+ && pip3 install -U pylint ipykernel \
124+ # timezone
125+ && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone \
126+ # Cleanup
127+ && apt-get clean \
128+ && rm -rf \
124129 /tmp/* \
125130 /var/lib/apt/lists/* \
126- /var/tmp/* && \
127- # TimeZone
128- ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
129-
130- COPY container_files/home_files/ $CUSTOM_HOME/
131+ /var/tmp/*
131132
132- COPY container_files/code-server /usr/local/share/.config/yarn/global/node_modules/code-server
133+ COPY container/home/ $CUSTOM_HOME/
133134
134- COPY container_files/code-server_data/ $CUSTOM_HOME
135+ COPY container/code-server/User/ /usr/local/share/code-server/User/
136+ COPY container/code-server/pages/ /usr/lib/code-server/src/browser/pages/
137+ COPY container/code-server/media/ /usr/lib/code-server/src/browser/media/
135138
136- RUN chmod -R ug+rwx $CUSTOM_HOME/ && \
137- chmod -R ug+rwx /usr/local/share/.config/yarn/global/node_modules/code-server/ && \
138- # Ngrok
139- chmod +x $CUSTOM_HOME/.ngrok_install.sh && \
140- bash -c '$CUSTOM_HOME/.ngrok_install.sh' && \
141- # GoogleDrive Requirements
142- pip install -r $CUSTOM_HOME/requirements.txt
139+ RUN chmod -R ug+rwx $CUSTOM_HOME/ \
140+ && chmod -R ug+rwx /usr/local/share/code-server/User \
141+ # Ngrok
142+ && chmod +x $CUSTOM_HOME/.ngrok_install.sh \
143+ && bash -c '$CUSTOM_HOME/.ngrok_install.sh'
143144
144145CMD supervisord -c $CUSTOM_HOME/.supervisord.conf
0 commit comments