Dockerfile 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. # STAGE 1,在临时镜像中编译 tintin
  2. FROM alpine:3.18.3
  3. RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
  4. # 安装编译器和依赖包
  5. RUN apk update \
  6. && apk add --no-cache git gcc libc-dev zlib-dev zlib-static pcre-dev make curl
  7. RUN git clone --depth 1 https://github.com/junegunn/vim-plug.git /vim-plug
  8. RUN git clone --depth 1 https://github.com/dzpao/vim-mbs.git /vim-mbs
  9. RUN git clone --depth 1 https://github.com/morhetz/gruvbox.git /gruvbox
  10. RUN git clone --depth 1 https://github.com/yegappan/mru.git /mru
  11. RUN git clone --depth 1 https://github.com/jlanzarotta/BufExplorer.git /BufExplorer
  12. RUN git clone --depth 1 https://github.com/mhinz/vim-startify.git /vim-startify
  13. RUN git clone --depth 1 https://github.com/mudclient/tintin.git --branch beta-develop
  14. WORKDIR /tintin/src/
  15. ENV PATH=.:/sbin:/bin:/usr/sbin:/usr/bin
  16. RUN ./configure LDFLAGS=-static && make && strip tt++
  17. # STAGE 2: 生成最终镜像
  18. FROM alpine:3.18.3
  19. LABEL name="paotin"
  20. LABEL maintainer="dzp <danzipao@gmail.com>"
  21. ENV LANG=zh_CN.UTF8 \
  22. TERM=xterm-256color \
  23. SHELL=/bin/bash \
  24. HOME=/paotin \
  25. PATH=/paotin/bin:/usr/sbin:/usr/bin:/sbin:/bin
  26. WORKDIR /paotin/
  27. RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
  28. RUN apk update \
  29. && apk add --no-cache tmux bash ncurses less neovim nano lf
  30. # 设置时区为上海
  31. RUN apk add --no-cache tzdata \
  32. && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
  33. && echo "Asia/Shanghai" > /etc/timezone \
  34. && apk del tzdata
  35. COPY profile.sh /paotin/.bash_profile
  36. COPY tmux.conf /paotin/.tmux.conf
  37. COPY init.tin /paotin/init.tin
  38. COPY HOW-TO-PLAY.md /paotin/
  39. COPY bin /paotin/bin/
  40. COPY docs /paotin/docs/
  41. COPY etc /paotin/etc/
  42. COPY framework /paotin/framework/
  43. COPY plugins /paotin/plugins/
  44. COPY mud /paotin/mud/
  45. COPY ids/EXAMPLE /paotin/ids/
  46. COPY ids/DEFAULT /paotin/ids/
  47. COPY ids/pkuxkx /paotin/ids/
  48. COPY ids/thuxyj /paotin/ids/
  49. COPY ids/paotin /paotin/ids/
  50. COPY init.vim /paotin/.config/nvim/
  51. COPY nanorc /root/.nanorc
  52. COPY --from=0 /vim-plug/plug.vim /paotin/.local/share/nvim/site/autoload/plug.vim
  53. COPY --from=0 /gruvbox /paotin/.local/share/nvim/plugged/gruvbox/
  54. COPY --from=0 /vim-mbs /paotin/.local/share/nvim/plugged/vim-mbs/
  55. COPY --from=0 /mru /paotin/.local/share/nvim/plugged/mru/
  56. COPY --from=0 /BufExplorer /paotin/.local/share/nvim/plugged/BufExplorer/
  57. COPY --from=0 /vim-startify /paotin/.local/share/nvim/plugged/vim-startify/
  58. COPY --from=0 /tintin/src/tt++ /paotin/bin/
  59. RUN mkdir -p /paotin/log/
  60. RUN mkdir -p /paotin/tmux/
  61. ENTRYPOINT ["/bin/bash", "-i", "/paotin/bin/start-ui"]