S2OJ/install/bundle/Dockerfile
Masco Skray 64683ad93f feat(install/bundle): install script adapt to Ubuntu 18.04
Update base system to Ubuntu 18.04.
.htaccess file's session path changed correctly.
Add gnupg install choice, due to base system has no gpg support.
Set DEBIAN_FRONTEND to noninteractive in order to prevent tzdata stuck.
Change Dockerfile's verion and buanch checkout method, in order to save space.
Fix mysql conf when not restart service and the database can't import judger info.
Change install.sh, support PHP7.2, update libv8 repo to artful, with missing php-mbstring.
The old JDK distfile mirrors are deprecated, changed to official.sed modded to get the latest jdk8.

BREAKING CHANGE: Ubuntu 14/16 users shouln't execute this script, due to config files and packages not the same.
2018-09-20 22:05:15 +08:00

24 lines
783 B
Docker

FROM ubuntu:18.04
MAINTAINER MascoSkray <MascoSkray@gmail.com>
#Update apt and install git
RUN apt-get update && apt-get install -y git gnupg
#Clone the latest UOJ Community verison to local
RUN cd ~ && git clone https://github.com/UniversalOJ/UOJ-System.git --depth 1 -b php7
#Install environment and set startup script
RUN cd ~/UOJ-System/install/bundle && bash install.sh -e && echo "\
#!/bin/bash\n\
if [ ! -f "/var/svn/.UOJSetupDone" ]; then\n\
cd ~/UOJ-System/install/bundle && bash install.sh -c\n\
fi\n\
service ntp start\n\
service mysql start\n\
service apache2 start\n\
svnserve -d -r /var/svn\n\
su local_main_judger -c \"~/judge_client/judge_client start\"\n\
exec bash\n" >/root/up && chmod +x /root/up
ENV LANG=C.UTF-8 TZ=Asia/Shanghai
EXPOSE 80 3690
CMD /root/up