runner-images/Dockerfile
张泊明518370910136 ad9530adfb
All checks were successful
push / build (push) Successful in 5m0s
feat: joj3-forge-convert
2025-06-01 08:35:35 -04:00

27 lines
1.1 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,/usr/local/bin/joj3-forge-convert\ntt ALL=(student) NOPASSWD:SETENV:ALL" > /etc/sudoers.d/joj
# install joint-teapot && joj3-forge
# TODO: change it to FOCS gitea mirror for deployment
RUN pip install --no-cache-dir --break-system-packages \
git+https://ghfast.top/https://github.com/BoYanZh/Joint-Teapot \
git+https://ghfast.top/https://github.com/joint-online-judge/JOJ3-config-generator
# install joj3 & repo-health-checker & joj3-forge-convert
COPY bin/joj3 bin/repo-health-checker bin/joj3-forge-convert /usr/local/bin/
USER student
WORKDIR /home/student