This commit is contained in:
Baoshuo Ren 2022-09-18 19:55:54 +08:00
parent 0d97897d92
commit aa5e3063dc
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
2 changed files with 11 additions and 3 deletions

View File

@ -5,6 +5,14 @@ ARG CLONE_ADDFLAG
ADD . /opt/uoj
WORKDIR /opt/uoj
ENV DEBIAN_FRONTEND=noninteractive
RUN 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 &&\
apt-get update && apt-get install -y git vim ntp zip unzip curl wget apache2 libapache2-mod-xsendfile libapache2-mod-php php php-dev php-pear php-zip php-mysql php-mbstring php-gd php-intl php-xsl g++ make re2c libv8-7.5-dev libyaml-dev &&\
yes | pecl install yaml &&\
git clone https://github.com/phpv8/v8js.git --depth=1 -b 2.1.2 /tmp/pear/download/v8js-master && cd /tmp/pear/download/v8js-master &&\
phpize && ./configure --with-php-config=/usr/bin/php-config --with-v8js=/opt/libv8-7.5 && make install && cd -
# Install environment and set startup script
RUN sh web/install.sh -p && echo "\
#!/bin/sh\n\

View File

@ -17,7 +17,7 @@ getAptPackage(){
apt-get update && apt-get install -y git vim ntp zip unzip curl wget apache2 libapache2-mod-xsendfile libapache2-mod-php php php-dev php-pear php-zip php-mysql php-mbstring php-gd php-intl php-xsl g++ make re2c libv8-7.5-dev libyaml-dev
# Install PHP extensions
yes | pecl install yaml
git clone https://github.com/phpv8/v8js.git --depth=1 -b php7 /tmp/pear/download/v8js-master && cd /tmp/pear/download/v8js-master
git clone https://github.com/phpv8/v8js.git --depth=1 -b 4c026f3fb291797c109adcabda6aeba6491fe44f /tmp/pear/download/v8js-master && cd /tmp/pear/download/v8js-master
phpize && ./configure --with-php-config=/usr/bin/php-config --with-v8js=/opt/libv8-7.5 && make install && cd -
}
@ -96,12 +96,12 @@ initProgress(){
}
prepProgress(){
getAptPackage;setLAMPConf;setWebConf
setLAMPConf;setWebConf
}
if [ $# -le 0 ]; then
echo 'Installing UOJ System web...'
prepProgress;initProgress
getAptPackage;prepProgress;initProgress
fi
while [ $# -gt 0 ]; do
case "$1" in