forked from trustyai-explainability/trustyai-explainability
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile.konflux
63 lines (49 loc) · 2.76 KB
/
Dockerfile.konflux
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
61
62
63
# Copyright 2023 Red Hat
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# 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.
# Build arguments
ARG SOURCE_CODE=.
ARG CI_CONTAINER_VERSION="unknown"
FROM registry.redhat.io/ubi8/ubi-minimal@sha256:c12e67af6a7e15113d76bc72f10bef2045c026c71ec8b7124c8a075458188a83 AS stage
# Define a build argument for the PNC list of built files
ARG PNC_FILES_JSON
RUN echo "Files to download: $PNC_FILES_JSON"
# Install packages for the install script and extract archives
RUN microdnf --setopt=install_weak_deps=0 --setopt=tsflags=nodocs install -y unzip jq wget
ENV STAGE_DIR="/tmp/artifacts"
WORKDIR $STAGE_DIR
# Filter the zip files only and unzip them in /root/
RUN echo "$PNC_FILES_JSON" | jq -r '.[] | select(test("\\.zip$"))' | \
while read url; do wget --no-check-certificate "$url"; done && \
for file in *.zip; do unzip -d /root/ "$file"; done
###############################################################################
FROM registry.redhat.io/ubi8/openjdk-17-runtime@sha256:592bf5e50453b6b89506df5b88b1ef51835914559b4e81355bcdcffe2e21dbaf as runtime
ENV LANGUAGE='en_US:en'
# We make four distinct layers so if there are application changes the library layers can be re-used
COPY --from=stage /root/explainability-service/target/quarkus-app/lib/ /deployments/lib/
COPY --from=stage /root/explainability-service/target/quarkus-app/*.jar /deployments/
COPY --from=stage /root/explainability-service/target/quarkus-app/app/ /deployments/app/
COPY --from=stage /root/explainability-service/target/quarkus-app/quarkus/ /deployments/quarkus/
## Build args to be used at this step
ARG USER=185
ENV JAVA_OPTS="-Dquarkus.http.host=0.0.0.0 -Djava.zutil.logging.manager=org.jboss.logmanager.LogManager"
ENV JAVA_APP_JAR="/deployments/quarkus-run.jar"
LABEL com.redhat.component="odh-trustyai-service" \
name="managed-open-data-hub/odh-trustyai-service-rhel8" \
description="TrustyAI is a service to provide integration fairness and bias tracking to modelmesh-served models" \
summary="odh-trustyai-service" \
maintainer="['[email protected]']" \
io.openshift.expose-services="" \
io.k8s.display-name="odh-trustyai-service" \
io.k8s.description="odh-trustyai-service" \
com.redhat.license_terms="https://www.redhat.com/licenses/Red_Hat_Standard_EULA_20191108.pdf"