mirror of
https://github.com/renbaoshuo/S2OJ.git
synced 2024-11-22 10:18:41 +00:00
fix(bundle): Refactor install scripts (#80)
This commit includes: * DEBIAN_FRONTEND=noninteractive in Dockerfile * move apt-get to Dockerfile
This commit is contained in:
parent
87749adb28
commit
588b3bf01f
@ -3,8 +3,9 @@ MAINTAINER MascoSkray <MascoSkray@gmail.com>
|
|||||||
ARG CLONE_ADDFLAG
|
ARG CLONE_ADDFLAG
|
||||||
|
|
||||||
WORKDIR /opt
|
WORKDIR /opt
|
||||||
|
ENV DEBIAN_FRONTEND=noninteractive
|
||||||
#Update apt and install git
|
#Update apt and install git
|
||||||
RUN apt-get update && apt-get install -y git
|
RUN apt-get update && apt-get install -y apache2 cmake curl fp-compiler g++ git gnupg libapache2-mod-php libapache2-mod-xsendfile libyaml-dev make mysql-server ntp openjdk-11-jdk openjdk-8-jdk php php-dev php-mbstring php-mysql php-pear php-zip python python3 python3-requests re2c unzip vim wget zip
|
||||||
#Clone the latest UOJ Community verison to local
|
#Clone the latest UOJ Community verison to local
|
||||||
RUN git clone https://github.com/UniversalOJ/UOJ-System.git --depth 1 --single-branch ${CLONE_ADDFLAG} uoj
|
RUN git clone https://github.com/UniversalOJ/UOJ-System.git --depth 1 --single-branch ${CLONE_ADDFLAG} uoj
|
||||||
#Install environment and set startup script
|
#Install environment and set startup script
|
||||||
|
@ -14,9 +14,8 @@ getAptPackage(){
|
|||||||
export DEBIAN_FRONTEND=noninteractive
|
export DEBIAN_FRONTEND=noninteractive
|
||||||
(echo "mysql-server mysql-server/root_password password $_database_password_";echo "mysql-server mysql-server/root_password_again password $_database_password_") | debconf-set-selections
|
(echo "mysql-server mysql-server/root_password password $_database_password_";echo "mysql-server mysql-server/root_password_again password $_database_password_") | debconf-set-selections
|
||||||
#Update apt sources and install
|
#Update apt sources and install
|
||||||
dpkg -s gnupg 2>/dev/null || (apt-get update && apt-get install -y gnupg)
|
|
||||||
echo "deb http://ppa.launchpad.net/stesie/libv8/ubuntu bionic main" | tee /etc/apt/sources.list.d/stesie-libv8.list && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D858A0DF
|
echo "deb http://ppa.launchpad.net/stesie/libv8/ubuntu bionic main" | tee /etc/apt/sources.list.d/stesie-libv8.list && apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D858A0DF
|
||||||
apt-get update && apt-get install -y vim ntp zip unzip curl wget apache2 libapache2-mod-xsendfile libapache2-mod-php php php-dev php-pear php-zip php-mysql php-mbstring mysql-server cmake fp-compiler re2c libv8-7.5-dev libyaml-dev python python3 python3-requests openjdk-8-jdk openjdk-11-jdk
|
apt-get update && apt-get install -y libv8-7.5-dev
|
||||||
#Install PHP extensions
|
#Install PHP extensions
|
||||||
yes | pecl install yaml
|
yes | pecl install yaml
|
||||||
git clone https://github.com/phpv8/v8js.git --depth=1 /tmp/pear/download/v8js-master && cd /tmp/pear/download/v8js-master
|
git clone https://github.com/phpv8/v8js.git --depth=1 /tmp/pear/download/v8js-master && cd /tmp/pear/download/v8js-master
|
||||||
|
Loading…
Reference in New Issue
Block a user