Dockerfile
2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM debian:13.4
RUN sed -i 's/deb.debian.org/mirrors.tencent.com/g' /etc/apt/sources.list.d/debian.sources
RUN apt-get update && \
apt-get install -y wget unzip lsof nload htop net-tools dnsutils openssh-server \
build-essential curl git gcc libc6-dev \
pkg-config libssl-dev ca-certificates vim ripgrep jq sudo && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN useradd -m -s /bin/bash user && \
echo "user:user" | chpasswd && \
adduser user sudo
RUN echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
USER user
# Install code-server and extensions
RUN curl -fsSL https://code-server.dev/install.sh | sudo sh \
&& code-server --install-extension golang.go \
&& code-server --install-extension cnbcool.cnb-welcome \
&& code-server --install-extension formulahendry.code-runner \
&& code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools \
&& code-server --install-extension tencent-cloud.coding-copilot \
&& code-server --install-extension github.github-vscode-theme \
&& code-server --install-extension ms-ceintl.vscode-language-pack-zh-hans \
&& code-server --install-extension eddieposey.vscode-icons-mac \
&& code-server --install-extension oderwat.indent-rainbow \
&& code-server --install-extension yzhang.markdown-all-in-one
# leetcode.vscode-leetcode
#RUN wget -c -N "https://marketplace.visualstudio.com/_apis/public/gallery/publishers/panxiaoan/vsextensions/themes-falcon-vscode/3.0.1/vspackage" -O panxiaoan.themes-falcon-vscode-3.0.1.vsix && \
# code-server --install-extension ./panxiaoan.themes-falcon-vscode-3.0.1.vsix
ENV TZ=Asia/Shanghai
ENV GIT_TERMINAL_PROMPT=0
RUN sudo apt-get -y update && sudo apt-get -y install hx wget curl git git-lfs zsh tmux tzdata && \
RUNZSH=no CHSH=no sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" && \
sudo apt-get install -y locales \
&& sudo rm -rf /var/lib/apt/lists/* \
&& sudo sed -i '/en_US.UTF-8/s/^# //g' /etc/locale.gen \
&& sudo localedef -i zh_CN -c -f UTF-8 -A /usr/share/locale/locale.alias zh_CN.UTF-8 \
&& sudo dpkg-reconfigure --frontend=noninteractive locales
RUN sudo /usr/bin/chsh -s $(which zsh)
ENV LANG=zh_CN.UTF-8
ENV LANGUAGE=zh_CN:zh
# ENV LC_ALL=zh_CN.UTF-8
RUN wget -c -N https://github.com/neovim/neovim/releases/download/v0.12.2/nvim-linux-x86_64.tar.gz && \
sudo tar xf nvim-linux-x86_64.tar.gz -C /usr/local && \
sudo ln -sf /usr/local/nvim-linux-x86_64/bin/nvim /usr/bin/nvim
RUN cd /home/user && git clone --single-branch https://github.com/gpakosz/.tmux.git && \
ln -s -f .tmux/.tmux.conf && cp .tmux/.tmux.conf.local .