23 lines
698 B
Docker
23 lines
698 B
Docker
# syntax=docker/dockerfile:1
|
|
|
|
FROM focs.ji.sjtu.edu.cn:5000/gitea/runner-images:ubuntu-latest-slim
|
|
|
|
RUN apt-get update && \
|
|
apt-get install -y sudo python3 python3-pip && \
|
|
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 && \
|
|
echo "student ALL=(tt) NOPASSWD:/usr/local/bin/joj3" > /etc/sudoers.d/joj
|
|
|
|
# install joint-teapot
|
|
# TODO: change it to FOCS gitea mirror for deployment
|
|
RUN pip install --no-cache-dir git+https://mirror.ghproxy.com/https://github.com/BoYanZh/Joint-Teapot
|
|
|
|
# install joj3 binary
|
|
COPY bin/joj3 /usr/local/bin/
|
|
|
|
USER student
|
|
WORKDIR /home/student
|