-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile-alpine
41 lines (31 loc) · 1.05 KB
/
Dockerfile-alpine
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
FROM alpine/git AS x3mlDownloader
WORKDIR /
# download x3ml and lock version
RUN git clone https://github.com/SmartUPDS/x3ml.git && \
cd /x3ml/ && \
git checkout f31cf8a7becbad049725b7a34733719554279281
FROM alpine/git AS meTypesetDownloader
WORKDIR /
# download meTypeset and lock version
RUN git clone https://github.com/MartinPaulEve/meTypeset && \
cd /meTypeset/ && \
git checkout f5a8bf3eaad2ec14f52fa380050e743b1df39abe
FROM maven:3.6.3-openjdk-8-slim as x3mlJar
WORKDIR /
COPY --from=x3mlDownloader /x3ml/ ./
RUN mvn clean package
FROM python:3.8-alpine
WORKDIR /
RUN apk update && apk add --no-cache openjdk8 make automake gcc g++
# python3 python3-pip
COPY --from=x3mlJar /target/x3ml-engine-1.9.5-3-smart-SNAPSHOT-exejar.jar ./x3ml/x3ml.jar
COPY --from=meTypesetDownloader /meTypeset ./meTypeset
#COPY . /refhar
WORKDIR /refhar
COPY requirements.txt requirements.txt
# python is python3 and install requirements
RUN python -m pip install -r requirements.txt
ENV FLASK_APP: app.py
ENV FLASK_RUN_HOST=0.0.0.0
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8