fix(bundle): Refactor install scripts (#80)

This commit includes:
* DEBIAN_FRONTEND=noninteractive in Dockerfile
* move apt-get to Dockerfile
This commit is contained in:
billchenchina 2021-01-24 01:41:30 +08:00 committed by GitHub
parent 87749adb28
commit 588b3bf01f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -3,8 +3,9 @@ MAINTAINER MascoSkray <MascoSkray@gmail.com>
ARG CLONE_ADDFLAG
WORKDIR /opt
ENV DEBIAN_FRONTEND=noninteractive
#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
RUN git clone https://github.com/UniversalOJ/UOJ-System.git --depth 1 --single-branch ${CLONE_ADDFLAG} uoj
#Install environment and set startup script

View File

@ -14,9 +14,8 @@ getAptPackage(){
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
#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
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
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