-
Notifications
You must be signed in to change notification settings - Fork 20
/
Dockerfile
37 lines (29 loc) · 1.12 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
# Copyright IBM Corporation 2021
#
# Licensed under the Apache Public License 2.0, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM gradle:jdk11 as build
WORKDIR /home/gradle
COPY core diva
WORKDIR /home/gradle/diva
RUN gradle ziptask
RUN jar xvf build/distributions/diva-all.zip
FROM openjdk:11-jre
ENV PYTHONUNBUFFERED=1
RUN apt-get update
RUN apt-get install -y python3 python3-pip graphviz git
RUN ln -sf python3 /usr/bin/python
RUN pip3 install --no-cache --upgrade pip pyyaml
RUN mkdir -p /diva-distribution/lib
COPY distrib/ /diva-distribution/
COPY --from=build /home/gradle/diva/bin/*.jar /diva-distribution/bin/
COPY --from=build /home/gradle/diva/lib/*.jar /diva-distribution/lib/
WORKDIR /diva-distribution/bin
ENTRYPOINT [ "bash" ]
CMD [ "./diva", "/app"]