-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
31 lines (21 loc) · 1.07 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
### HOW TO BUILD AND PUSH ####
# docker image build . -t picto-web
# docker tag picto-web:latest alfayohannisyorkacuk/picto-web:latest
# docker push alfayohannisyorkacuk/picto-web:latest
### HOW TO RUN ON WINDOWS ###
# docker run --rm -i -t -v %cd%:/workspace --hostname=picto -p 8081:8081 --name=picto picto-web
# docker run --rm -i -t -v %cd%:/workspace --hostname=picto -p 8081:8081 --name=picto alfayohannisyorkacuk/picto-web
### HOW TO RUN ON LINUX ###
# docker run --rm -i -t -v $PWD:/workspace --hostname=picto -p 8081:8081 --name=picto picto-web
# docker run --rm -i -t -v $PWD:/workspace --hostname=picto -p 8081:8081 --name=picto alfayohannisyorkacuk/picto-web
FROM maven:3-openjdk-11 AS build
COPY . /sources
RUN cd /sources/org.eclipse.epsilon.picto.web && mvn -B clean install
FROM openjdk:11-jre-slim-bullseye AS dist
WORKDIR /program
RUN apt-get update && apt-get install -y \
graphviz \
nocache \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /sources/org.eclipse.epsilon.picto.web/picto.jar /program/picto.jar
ENTRYPOINT ["java", "-jar", "/program/picto.jar"]