261
261
# Select the ubi OS packages.
262
262
print_ubi_pkg () {
263
263
cat >> " $1 " << 'EOI '
264
- RUN dnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar binutils \
264
+ RUN dnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \
265
265
&& dnf update -y; dnf clean all
266
266
EOI
267
267
}
@@ -270,15 +270,15 @@ EOI
270
270
# Select the ubi OS packages.
271
271
print_ubi-minimal_pkg () {
272
272
cat >> " $1 " << 'EOI '
273
- RUN microdnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar binutils \
273
+ RUN microdnf install -y tzdata openssl curl ca-certificates fontconfig glibc-langpack-en gzip tar \
274
274
&& microdnf update -y; microdnf clean all
275
275
EOI
276
276
}
277
277
278
278
# Select the CentOS packages.
279
279
print_centos_pkg () {
280
280
cat >> " $1 " << 'EOI '
281
- RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar binutils \
281
+ RUN yum install -y tzdata openssl curl ca-certificates fontconfig gzip tar \
282
282
&& yum update -y; yum clean all
283
283
EOI
284
284
}
@@ -477,10 +477,30 @@ EOI
477
477
}
478
478
479
479
# Call the script to create the slim package for Ubi
480
- # Using binutils package installed at startup for the "strip" command
481
- # Same function used for ubi-minimal, centos and clefos
482
480
print_ubi_slim_package () {
483
481
cat >> " $1 " << -EOI
482
+ export PATH="${jhome} /bin:\$ PATH"; \\
483
+ dnf install -y binutils; \\
484
+ /usr/local/bin/slim-java.sh ${jhome} ; \\
485
+ dnf remove -y binutils; \\
486
+ dnf clean all; \\
487
+ EOI
488
+ }
489
+
490
+ # Call the script to create the slim package for Ubi
491
+ print_ubi-minimal_slim_package () {
492
+ cat >> " $1 " << -EOI
493
+ export PATH="${jhome} /bin:\$ PATH"; \\
494
+ microdnf install -y binutils; \\
495
+ /usr/local/bin/slim-java.sh ${jhome} ; \\
496
+ microdnf remove -y binutils; \\
497
+ microdnf clean all; \\
498
+ EOI
499
+ }
500
+
501
+ # Call the script to create the slim package for Ubi
502
+ print_centos_slim_package () {
503
+ cat >> " $1 " << -EOI
484
504
export PATH="${jhome} /bin:\$ PATH"; \\
485
505
/usr/local/bin/slim-java.sh ${jhome} ; \\
486
506
EOI
@@ -661,9 +681,12 @@ RUN set -eux; \\
661
681
case "\$ {ARCH}" in \\
662
682
EOI
663
683
print_java_install_pre " ${file} " " ${pkg} " " ${bld} " " ${btype} " " ${osfamily} " " ${os} "
664
- if [ " ${btype} " == " slim" ]; then
684
+ if [ " ${btype} " == " slim" && ${os} == " ubi " ]; then
665
685
print_ubi_slim_package " $1 "
666
686
fi
687
+ if [ " ${btype} " == " slim" && ${os} == " ubi-minimal" ]; then
688
+ print_ubi-minimal_slim_package " $1 "
689
+ fi
667
690
print_java_install_post " $1 "
668
691
}
669
692
@@ -687,7 +710,7 @@ RUN set -eux; \\
687
710
EOI
688
711
print_java_install_pre " ${file} " " ${pkg} " " ${bld} " " ${btype} " " ${osfamily} " " ${os} "
689
712
if [ " ${btype} " == " slim" ]; then
690
- print_ubi_slim_package " $1 "
713
+ print_centos_slim_package " $1 "
691
714
fi
692
715
print_java_install_post " $1 "
693
716
}
0 commit comments