|
FROM ubuntu:latest |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
build-essential \ |
|
net-tools \ |
|
fonts-noto-cjk \ |
|
chromium-browser \ |
|
chromium-browser \ |
|
curl \ |
|
git \ |
|
wget \ |
|
unzip \ |
|
software-properties-common |
|
|
|
|
|
RUN apt-get install -y zsh ripgrep golang screen vim cmake openjdk-17-jdk openjdk-17-jre gdb |
|
|
|
|
|
RUN apt-get install -y python3 python3-pip |
|
|
|
|
|
|
|
RUN apt-get install -y gcc g++ |
|
|
|
|
|
RUN apt-get install -y nodejs |
|
RUN apt-get clean |
|
|
|
|
|
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y |
|
|
|
|
|
RUN wget -O vscode.tar.gz "https://update.code.visualstudio.com/latest/server-linux-x64-web/stable" && \ |
|
mkdir -p /usr/local/vscode && \ |
|
tar -xzf vscode.tar.gz -C /usr/local/vscode --strip-components=1 && \ |
|
rm vscode.tar.gz |
|
|
|
|
|
USER ubuntu |
|
|
|
|
|
RUN sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \ |
|
sed -i 's/robbyrussell/bira/g' /home/ubuntu/.zshrc && \ |
|
echo 'plugins=(git golang node npm pip python debian extract)' >> /home/ubuntu/.zshrc |
|
|
|
|
|
RUN git clone https://github.com/flutter/flutter.git -b stable --depth 1 /home/ubuntu/.local/flutter && \ |
|
/home/ubuntu/.local/flutter/bin/flutter config --no-analytics && \ |
|
/home/ubuntu/.local/flutter/bin/flutter precache && \ |
|
echo 'export PATH=$PATH:/home/ubuntu/.local/flutter/bin:/home/ubuntu/.local/conda/bin' >> /home/ubuntu/.bashrc && \ |
|
echo 'export PATH=$PATH:/home/ubuntu/.local/flutter/bin:/home/ubuntu/.local/conda/bin' >> /home/ubuntu/.zshrc |
|
|
|
|
|
ENV HOME=/home/ubuntu \ |
|
PATH=/home/ubuntu/.local/bin:$PATH |
|
|
|
|
|
WORKDIR $HOME/app |
|
|
|
|
|
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.0/install.sh | bash && \ |
|
echo 'export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")"' >> /home/ubuntu/.bashrc && \ |
|
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> /home/ubuntu/.zshrc && \ |
|
. ~/.nvm/nvm.sh |
|
|
|
|
|
RUN mkdir -p /home/ubuntu/.vscode && \ |
|
/usr/local/vscode/bin/code-server --extensions-dir /home/ubuntu/.vscode \ |
|
--install-extension aaron-bond.better-comments \ |
|
--install-extension adpyke.codesnap \ |
|
--install-extension ccagml.vscode-leetcode-problem-rating \ |
|
--install-extension dart-code.dart-code \ |
|
--install-extension dart-code.flutter \ |
|
--install-extension dbaeumer.vscode-eslint \ |
|
--install-extension dsznajder.es7-react-js-snippets \ |
|
--install-extension eamodio.gitlens \ |
|
--install-extension editorconfig.editorconfig \ |
|
--install-extension esbenp.prettier-vscode \ |
|
--install-extension formulahendry.code-runner \ |
|
--install-extension giscafer.leek-fund \ |
|
--install-extension golang.go \ |
|
--install-extension humao.rest-client \ |
|
--install-extension johnpapa.vscode-peacock \ |
|
--install-extension leetcode.vscode-leetcode \ |
|
--install-extension ms-azuretools.vscode-docker \ |
|
--install-extension ms-python.debugpy \ |
|
--install-extension ms-python.isort \ |
|
--install-extension ms-python.python \ |
|
--install-extension ms-python.vscode-pylance \ |
|
--install-extension ms-toolsai.jupyter \ |
|
--install-extension ms-toolsai.jupyter-keymap \ |
|
--install-extension ms-toolsai.jupyter-renderers \ |
|
--install-extension ms-toolsai.vscode-jupyter-cell-tags \ |
|
--install-extension ms-toolsai.vscode-jupyter-slideshow \ |
|
--install-extension ms-vscode-remote.remote-containers \ |
|
--install-extension ms-vscode-remote.remote-ssh \ |
|
--install-extension ms-vscode-remote.remote-ssh-edit \ |
|
--install-extension ms-vscode.cpptools \ |
|
--install-extension ms-vscode.cpptools-extension-pack \ |
|
--install-extension ms-vscode.cpptools-themes \ |
|
--install-extension ms-vscode.js-debug-companion \ |
|
--install-extension ms-vscode.remote-explorer \ |
|
--install-extension msjsdiag.vscode-react-native \ |
|
--install-extension rangav.vscode-thunder-client \ |
|
--install-extension redhat.java \ |
|
--install-extension rust-lang.rust-analyzer \ |
|
--install-extension shd101wyy.markdown-preview-enhanced \ |
|
--install-extension streetsidesoftware.code-spell-checker \ |
|
--install-extension twxs.cmake \ |
|
--install-extension visualstudioexptteam.vscodeintellicode \ |
|
--install-extension vscjava.vscode-java-debug \ |
|
--install-extension vscjava.vscode-java-dependency \ |
|
--install-extension vscjava.vscode-java-pack \ |
|
--install-extension vscjava.vscode-java-test \ |
|
--install-extension vscjava.vscode-maven \ |
|
--install-extension vscodevim.vim \ |
|
--install-extension wayou.vscode-todo-highlight \ |
|
--install-extension webfreak.debug \ |
|
--install-extension wix.vscode-import-cost \ |
|
--install-extension wmaurer.change-case \ |
|
--install-extension zhuangtongfa.material-theme |
|
|
|
|
|
EXPOSE 7860 |
|
|
|
|
|
ENTRYPOINT ["/bin/sh", "-c", "exec /usr/local/vscode/bin/code-server --extensions-dir /home/ubuntu/.vscode --port=7860 --connection-token=${PASSWORD} --host=0.0.0.0 --accept-server-license-terms", "--"] |
|
|