add zsh.
All checks were successful
Deploy Docker Images / Docusaurus build and Server deploy (push) Successful in 10m23s

This commit is contained in:
amass 2024-09-13 22:33:47 +08:00
parent e2f4974f89
commit a15a212a33

View File

@ -2,10 +2,12 @@ FROM ubuntu:24.04
LABEL maintainer="amass <168062547@qq.com>"
ENV DEBIAN_FRONTEND=noninteractive
ENV CODE_VERSION=4.92.2
RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.ustc.edu.cn@g' /etc/apt/sources.list.d/ubuntu.sources \
&& apt update \
&& apt install -y gcc g++ cmake ninja-build pkg-config openssh-server git nano gpg ca-certificates \
wget curl rsync lsb-release ubuntu-keyring gnupg2 libssl-dev gettext jq \
wget curl rsync lsb-release ubuntu-keyring gnupg2 libssl-dev gettext jq zsh tini \
&& install -m 0755 -d /etc/apt/keyrings \
&& curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc \
&& chmod a+r /etc/apt/keyrings/docker.asc \
@ -16,6 +18,18 @@ RUN sed -i 's@//.*archive.ubuntu.com@//mirrors.ustc.edu.cn@g' /etc/apt/sources.l
&& apt update \
&& apt install -y docker-ce-cli openresty nodejs
RUN curl -fOL https://github.com/coder/code-server/releases/download/v$CODE_VERSION/code-server_${CODE_VERSION}_amd64.deb \
&& dpkg -i code-server_${CODE_VERSION}_amd64.deb \
&& rm code-server_${CODE_VERSION}_amd64.deb
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" \
&& git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions \
&& git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting \
&& git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k \
&& sed -i 's/ZSH_THEME=".*"/ZSH_THEME="powerlevel10k\/powerlevel10k"/' /root/.zshrc \
&& sed -i 's/plugins=(.*)/plugins=(git z zsh-autosuggestions zsh-syntax-highlighting)/' /root/.zshrc \
&& chsh -s /bin/zsh root
RUN git config --global core.quotepath false \
&& git config --global user.email "168062547@qq.com" \
&& git config --global user.name "amass"
@ -33,17 +47,21 @@ RUN git config --global user.email "168062547@qq.com" \
&& git config --global user.name "amass"
RUN cd /root \
&& wget https://frp-by1.wwvvww.cn:44048/s/boost_1_85_0/download -O boost_1_85_0.tar.gz \
&& tar xvf boost_1_85_0.tar.gz > /dev/null \
&& cd /root/boost_1_85_0 \
&& ./bootstrap.sh --prefix=/opt/Libraries/boost_1_85_0 \
&& ./b2 install -q --prefix=/opt/Libraries/boost_1_85_0 threading=multi link=shared runtime-link=shared variant=release cxxstd=17 cxxflags=-fPIC cflags=-fPIC \
&& rm -fr /root/boost_1_85_0*
&& wget https://frp-by1.wwvvww.cn:44048/s/boost_1_86_0/download -O boost_1_86_0.tar.gz \
&& tar xvf boost_1_86_0.tar.gz > /dev/null \
&& cd /root/boost_1_86_0 \
&& ./bootstrap.sh --prefix=/opt/Libraries/boost_1_86_0 \
&& ./b2 install -q --prefix=/opt/Libraries/boost_1_86_0 threading=multi link=shared runtime-link=shared variant=release cxxstd=17 cxxflags=-fPIC cflags=-fPIC \
&& rm -fr /root/boost_1_86_0* \
&& echo 'export LD_LIBRARY_PATH=/opt/Libraries/boost_1_86_0/lib:$LD_LIBRARY_PATH' >> /etc/zsh/zprofile \
&& echo 'export LD_LIBRARY_PATH=/opt/Libraries/boost_1_86_0/lib:$LD_LIBRARY_PATH' >> /etc/profile
ENV LD_LIBRARY_PATH=/opt/Libraries/boost_1_85_0/lib:$LD_LIBRARY_PATH
ENV LANG C.UTF-8
ENV LANG=C.UTF-8
ENV LC_ALL=C.UTF-8
ENV TERM=xterm-256color
CMD ["service", "ssh", "start", "-D"]
ENTRYPOINT ["/usr/bin/tini", "--"]
CMD ["bash", "-c", "service ssh start && code-server --bind-addr 0.0.0.0:8087"]
# docker build --progress=tty -f ubuntu2404.dockerfile -t frp-by1.wwvvww.cn:45288/ubuntu_dev:24.04 .
# docker push frp-by1.wwvvww.cn:45288/ubuntu_dev:24.04