# Add password to root user RUNecho'root:roottoor' | chpasswd
# 安装ohmyzsh RUN pacman -S --noconfirm curl RUN pacman -S --noconfirm zsh RUN pacman -S --noconfirm git RUN pacman -S --noconfirm nano
WORKDIR /root RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" RUN git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions RUN git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting RUN sed -i 's|^ZSH_THEME="robbyrussell"|ZSH_THEME="ys"|' /root/.zshrc RUN sed -i 's|^plugins=(git)|plugins=(\ngit\nzsh-syntax-highlighting\nzsh-autosuggestions\n)|' /root/.zshrc RUN chsh -s /bin/zsh
# Fix sshd RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config RUN sed -i 's|^#Port 22|Port 22222|' /etc/ssh/sshd_config RUN sed -i 's|^#PubkeyAuthentication|PubkeyAuthentication|' /etc/ssh/sshd_config