runner-images/Dockerfile
张泊明518370910136 14977dea12
Some checks failed
push / build (push) Failing after 18s
feat: add teapot-checker to image
2024-11-28 11:07:14 -05:00

25 lines
1.0 KiB
Docker

FROM focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest-slim
ENV TZ="Asia/Shanghai"
RUN sed -i s@/deb.debian.org/@/mirrors.tuna.tsinghua.edu.cn/@g /etc/apt/sources.list.d/debian.sources && \
apt-get update && \
apt-get install -y --no-install-recommends sudo python3-minimal python3-pip git git-lfs openssh-client && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
userdel -r node && \
useradd -u 1000 -ms /bin/bash tt && \
useradd -u 1001 -ms /bin/bash student && \
usermod -aG student tt && \
echo "student ALL=(tt) NOPASSWD:SETENV:/usr/local/bin/joj3\nstudent ALL=(tt) NOPASSWD:SETENV:/usr/local/bin/joj3-teapot" > /etc/sudoers.d/joj
# install joint-teapot
# TODO: change it to FOCS gitea mirror for deployment
RUN pip install git+https://ghp.ci/https://github.com/BoYanZh/Joint-Teapot --break-system-packages
# install joj3 & repo-health-checker & teapot-checker
COPY bin/joj3 bin/repo-health-checker bin/teapot-checker /usr/local/bin/
USER student
WORKDIR /home/student