Skip to content

Commit fa066b7

Browse files
committed
Pull in the further changes
Signed-off-by: Jayashree Huttanagoudar <[email protected]>
1 parent 22bda43 commit fa066b7

File tree

1 file changed

+48
-7
lines changed

1 file changed

+48
-7
lines changed

templates/multistage-dockerfile-buildconfig.yaml

Lines changed: 48 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,28 +6,69 @@ metadata:
66
description: Template to produce a light weight imagestream and buildconfig for a multistage build
77
name: multistage-build-template
88
objects:
9+
##############################################################################
10+
# the INPUT ImageStream (from phase 2)
11+
- apiVersion: image.openshift.io/v1
12+
kind: ImageStream
13+
metadata:
14+
name: intermediate
15+
spec:
16+
lookupPolicy:
17+
local: true
18+
tags:
19+
- from:
20+
kind: DockerImage
21+
name: quay.io/jdowland/jlink:ubi9-jlinked-image
22+
name: latest
23+
referencePolicy:
24+
type: Local
25+
##############################################################################
26+
# the OUTPUT ImageStream
927
- apiVersion: image.openshift.io/v1
1028
kind: ImageStream
1129
metadata:
1230
name: lightweight-image
1331
spec:
1432
lookupPolicy:
1533
local: false
34+
##############################################################################
1635
- apiVersion: build.openshift.io/v1
1736
kind: BuildConfig
1837
metadata:
1938
name: multistage-buildconfig
2039
spec:
2140
source:
22-
type: Git
23-
git:
24-
uri: https://github.com/jhuttana/openjdk.git
25-
ref: phase-4
26-
contextDir: templates/jlink/
41+
images:
42+
- from:
43+
kind: ImageStreamTag
44+
name: intermediate:latest
45+
paths:
46+
# path does not exist in intermediate image, yet
47+
# - sourcePath: /mnt/jrootfs
48+
# destinationDir: jrootfs
49+
- sourcePath: /deployments
50+
destinationDir: deployments
51+
- sourcePath: /tmp/jre/.
52+
destinationDir: customJVM
53+
- sourcePath: /opt/jboss/container/.
54+
destinationDir: runScripts
55+
type: Dockerfile
56+
dockerfile: |
57+
FROM registry.access.redhat.com/ubi9/ubi-micro
58+
ARG JAVA_HOME=/usr/lib/jvm/java
59+
60+
#COPY jrootfs/ /
61+
COPY deployments /
62+
COPY customJVM ${JAVA_HOME}
63+
COPY runScripts /opt/jboss/container/
64+
# these are in the micro image
65+
RUN rm -rf /var/lib/dnf /var/lib/rpm
66+
67+
ENV JAVA_HOME="${JAVA_HOME}" PATH="${JAVA_HOME}/bin:$PATH"
68+
USER 185
69+
CMD /opt/jboss/container/java/run/run-java.sh
2770
strategy:
2871
type: Docker
29-
dockerStrategy:
30-
dockerfilePath: Dockerfile
3172
output:
3273
to:
3374
kind: ImageStreamTag

0 commit comments

Comments
 (0)