-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
31 lines (20 loc) · 863 Bytes
/
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
FROM openjdk:8-jdk
RUN curl -sL https://deb.nodesource.com/setup_9.x | bash -
RUN apt-get install -y nodejs
COPY . /source
WORKDIR /source
RUN ./gradlew clean shadow
WORKDIR /source/frontend
RUN git config --global user.email nobody@nobody.com && git config --global user.name Nobody
RUN npm install
RUN npm run build
FROM openjdk:8-jre
RUN apt-get update && apt-get -y install libgtk2.0-0:amd64
RUN mkdir /app
COPY --from=0 /source/build/libs/facerec-1.0-SNAPSHOT-all.jar /source/config.properties /source/ssl.p12 /app/
COPY --from=0 /source/frontend/dist /app/public
COPY --from=0 /source/photos /app/photos
WORKDIR /app
RUN sed -i -e '/public_html=/c\public_html=public' config.properties
RUN sed -i -e '/cert_path=/c\cert_path_is=disabled' config.properties
CMD sh -c "ln -s /dev/null /dev/raw1394; java -Xmx150m -jar facerec-1.0-SNAPSHOT-all.jar"