| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- FROM alpine:latest
- LABEL maintainer="Jeremy Zheng"
- RUN apk update
- RUN apk upgrade
- RUN apk add vim wget curl bash zsh pwgen openssl git tmux rsync \
- tar zip unzip bzip2 bzip3 xz \
- inetutils-telnet bind-tools \
- openssh-client sshpass \
- build-base cmake pkgconf \
- nodejs npm yarn \
- openjdk21 gradle maven \
- python3 py3-pip python3-dev \
- openssl-dev
- RUN mkdir -p $HOME/downloads $HOME/local $HOME/tmp
- # https://github.com/ohmyzsh/ohmyzsh
- RUN git clone https://github.com/ohmyzsh/ohmyzsh.git $HOME/.oh-my-zsh
- RUN cp $HOME/.oh-my-zsh/templates/zshrc.zsh-template $HOME/.zshrc
- RUN echo 'export PATH=$HOME/.local/bin:$PATH' >> $HOME/.profile
- RUN echo 'source $HOME/.profile' >> $HOME/.zshrc
- RUN git config --global core.quotepath false
- RUN git config --global http.version HTTP/1.1
- RUN git config --global pull.rebase false
- RUN echo 'set-option -g history-limit 102400' > $HOME/.tmux.conf
- RUN echo 'set-option -g default-shell "/bin/zsh"' >> $HOME/.tmux.conf
- # https://pip.pypa.io/en/stable/installation/
- RUN sh -c ". $HOME/.profile \
- && python3 -m venv $HOME/local/python3 \
- && . $HOME/local/python3/bin/activate \
- && pip install --upgrade pip \
- && pip install ansible paramiko \
- && pip install bypy"
- RUN echo 'export ANSIBLE_HOST_KEY_CHECKING=False' >> $HOME/.profile
- RUN echo 'alias peony="ANSIBLE_LOG_PATH=$HOME/tmp/$(date +%Y%m%d%H%M%S).log ansible-playbook"' >> $HOME/.profile
- RUN echo 'source $HOME/local/python3/bin/activate' >> $HOME/.zshrc
- RUN echo "$(date -u +%4Y%m%d%H%M%S)" | tee /VERSION
- VOLUME /workspace
- WORKDIR /workspace
- CMD ["/bin/zsh", "-l"]
|