29 lines
1.2 KiB
Plaintext
29 lines
1.2 KiB
Plaintext
|
# docker run -it --name devenv
|
||
|
FROM ubuntu:latest
|
||
|
WORKDIR /root
|
||
|
|
||
|
RUN apt-get update
|
||
|
RUN apt-get upgrade -y
|
||
|
RUN apt-get install zsh git curl bash vim nano openssh-server shellinabox -y
|
||
|
RUN chsh -s $(which zsh)
|
||
|
RUN sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
|
||
|
RUN git clone https://github.com/zsh-users/zsh-autosuggestions.git /root/.oh-my-zsh/custom/plugins/zsh-autosuggestions
|
||
|
RUN git clone https://github.com/zsh-users/zsh-syntax-highlighting.git /root/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
|
||
|
|
||
|
RUN echo export ZSH=\"\$HOME/.oh-my-zsh\" > /root/.zshrc
|
||
|
RUN echo ZSH_THEME=\"robbyrussell\" >> /root/.zshrc
|
||
|
RUN echo plugins=\(git zsh-autosuggestions zsh-syntax-highlighting\) >> /root/.zshrc
|
||
|
RUN echo source \$ZSH/oh-my-zsh.sh >> /root/.zshrc
|
||
|
RUN echo service shellinabox start >> /root/.zshrc
|
||
|
|
||
|
|
||
|
RUN echo "root:password" | chpasswd
|
||
|
RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config
|
||
|
RUN sed -i 's/SHELLINABOX_ARGS="--no-beep"/SHELLINABOX_ARGS="--no-beep --disable-ssl"/g' /etc/default/shellinabox
|
||
|
|
||
|
|
||
|
|
||
|
EXPOSE 4200
|
||
|
# RUN echo "#!/bin/bash\nservice shellinabox start" > /entrypoint.sh
|
||
|
# RUN chmod +x /entrypoint.sh
|
||
|
# ENTRYPOINT ["/entrypoint.sh"]
|