-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (20 loc) · 1.01 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
# ----------------------------------------------------------------------------------------------------------------------
# Compiling image
# ----------------------------------------------------------------------------------------------------------------------
FROM ubuntu:20.04 as compiler
MAINTAINER borisskert <boris.skert@gmail.com>
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && \
apt-get install -y openjdk-11-jdk \
maven
COPY . /usr/local/src
WORKDIR /usr/local/src
RUN mvn package
# ----------------------------------------------------------------------------------------------------------------------
# Runtime image
# ----------------------------------------------------------------------------------------------------------------------
FROM ubuntu:20.04
RUN apt-get update && \
apt-get install -y openjdk-11-jre
COPY --from=compiler /usr/local/src/target/sudoku.jar /usr/local/lib/sudoku.jar
ENTRYPOINT ["java", "-Dfile.encoding=UTF-8", "-jar", "/usr/local/lib/sudoku.jar"]