forked from Eagle-OJ/eagle-oj-api
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
42 lines (35 loc) · 1.16 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
FROM ubuntu:16.04
LABEL "version"="1.0"
LABEL "maintainer"="chendingchao1@126.com"
WORKDIR /eagle-oj
RUN apt update && \
apt install -y git && \
apt install -y openjdk-8-jre && \
apt install -y openjdk-8-jdk && \
apt install -y maven && \
apt install -y curl && \
curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
apt install -y nodejs && \
git clone https://github.com/Eagle-OJ/eagle-oj-web.git && \
git clone https://github.com/Eagle-OJ/eagle-oj-api.git && \
cd eagle-oj-web && \
npm install && \
npm run build && \
mv dist/* ../eagle-oj-api/eagle-oj-web/src/main/resources/public/ && \
cd ../eagle-oj-api && \
mvn clean package && \
mv eagle-oj-web/target/eagle-oj-web-1.0.jar /eagle-oj && \
cd /eagle-oj && \
apt clean && \
rm -rf eagle-oj-api && \
rm -rf eagle-oj-web && \
apt remove -y git && \
apt remove -y maven && \
apt remove -y nodejs && \
apt remove -y openjdk-8-jdk && \
rm -rf /root/.m2 && \
rm -rf /root/.npm
VOLUME ["/eagle-oj/data"]
# ENV MYSQL_URL=101.132.164.120:3306 MYSQL_DATABASE=eagle_oj MYSQL_USERNAME=root MYSQL_PASSWORD=eagle_oj
CMD ["java", "-Dspring.profiles.active=prod", "-jar", "eagle-oj-web-1.0.jar"]
EXPOSE 8080