-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
60 lines (51 loc) · 2.1 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# *************************************************************************
# ** Copyright (c) 2022-24 CentraleSupélec & EDF.
# ** All rights reserved. This program and the accompanying materials
# ** are made available under the terms of the Eclipse Public License v2.0
# ** which accompanies this distribution, and is available at
# ** https://www.eclipse.org/legal/epl-v20.html
# **
# ** This file is part of the RiseClipse tool
# **
# ** Contributors:
# ** Computer Science Department, CentraleSupélec
# ** EDF R&D
# ** Contacts:
# ** [email protected]
# ** [email protected]
# ** Web site:
# ** https://riseclipse.github.io
# *************************************************************************
FROM eclipse-temurin:17 as jre-build
# Create a custom Java runtime
RUN $JAVA_HOME/bin/jlink \
--add-modules java.base,java.desktop,java.logging,java.xml \
--strip-debug \
--no-man-pages \
--no-header-files \
--compress=2 \
--output /javaruntime
# Base image
FROM debian:bookworm-slim
## environment settings
ENV HOME="/config"
ENV TZ=Europe/Paris
ARG DEBIAN_FRONTEND=noninteractive
ENV JAVA_HOME=/opt/java/openjdk
ENV PATH "${JAVA_HOME}/bin:${PATH}"
COPY --from=jre-build /javaruntime $JAVA_HOME
RUN \
apt-get update \
&& apt-get install -y \
python3 \
python3-pytest \
&& ln -s /usr/bin/python3 /usr/bin/python \
&& apt-get clean \
&& rm -rf \
/tmp/* \
/var/lib/apt/lists/* \
/var/tmp/*
# "Download artifact" action creates subdirectory named from the artifact's name
COPY artifacts/RiseClipseValidatorSCL-*/RiseClipseValidatorSCL-*.jar /usr/riseclipse/bin/RiseClipseValidatorSCL.jar
WORKDIR /usr/riseclipse
CMD java -jar bin/RiseClipseValidatorSCL.jar data/*