S2OJ/web/Dockerfile

21 lines
410 B
Docker
Raw Normal View History

2022-03-16 11:59:14 +00:00
FROM ubuntu:20.04
2022-03-16 09:00:39 +00:00
ARG CLONE_ADDFLAG
ADD . /opt/uoj
WORKDIR /opt/uoj
# Install environment and set startup script
RUN sh web/install.sh -p && echo "\
#!/bin/sh\n\
if [ ! -f \"/var/uoj_data/.UOJSetupDone\" ]; then\n\
cd /opt/uoj/web && sh install.sh -i\n\
fi\n\
service ntp start\n\
service apache2 start\n\
exec bash\n" >/opt/up && chmod +x /opt/up
ENV LANG=C.UTF-8 TZ=Asia/Shanghai
2022-09-18 02:34:20 +00:00
EXPOSE 80
2022-03-16 09:00:39 +00:00
CMD /opt/up