Skip to content

Commit 7d2f912

Browse files
committed
Use tabs instead of spaces, also use /usr/local/bin instead of /scripts as
script location.
1 parent 6cd29ac commit 7d2f912

File tree

1 file changed

+25
-21
lines changed

1 file changed

+25
-21
lines changed

dockerfile_functions.sh

Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -699,31 +699,35 @@ print_cmd() {
699699
}
700700

701701
copy_scc_script() {
702-
if [[ "${vm}" == "openj9" && "${os_family}" != "windows" ]]; then
703-
cat >> "$1" <<-EOI
704-
COPY generate_openj9_scc.sh /scripts/
702+
if [[ "${vm}" == "openj9" && "${os_family}" != "windows" ]]; then
703+
cat >> "$1" <<-EOI
704+
705+
COPY generate_openj9_scc.sh /usr/local/bin/
706+
705707
EOI
706-
fi
708+
fi
707709
}
708710

709711
run_scc_gen() {
710-
if [[ "${vm}" == "openj9" && "${os_family}" != "windows" ]]; then
711-
# Alpine needs bash to be present to run the generate_openj9_scc.sh script
712-
if [[ "${os_family}" == "alpine" ]]; then
713-
cat >> "$1" <<-EOI
714-
RUN apk add --no-cache --virtual .scc-deps bash curl; \\
715-
/scripts/generate_openj9_scc.sh; \\
716-
apk del --purge .scc-deps; \\
717-
rm -rf /var/cache/apk/*;
718-
ENV OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal"
719-
EOI
720-
else
721-
cat >> "$1" <<-EOI
722-
RUN /scripts/generate_openj9_scc.sh
723-
ENV OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal"
724-
EOI
725-
fi
726-
fi
712+
if [[ "${vm}" == "openj9" && "${os_family}" != "windows" ]]; then
713+
# Alpine needs bash to be present to run the generate_openj9_scc.sh script
714+
if [[ "${os_family}" == "alpine" ]]; then
715+
cat >> "$1" <<-EOI
716+
RUN apk add --no-cache --virtual .scc-deps bash curl; \\
717+
/usr/local/bin/generate_openj9_scc.sh; \\
718+
apk del --purge .scc-deps; \\
719+
rm -rf /var/cache/apk/*;
720+
721+
ENV OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal"
722+
EOI
723+
else
724+
cat >> "$1" <<-EOI
725+
RUN /usr/local/bin/generate_openj9_scc.sh
726+
727+
ENV OPENJ9_JAVA_OPTIONS="-Xshareclasses:name=openj9_system_scc,cacheDir=/opt/java/.scc,readonly,nonFatal"
728+
EOI
729+
fi
730+
fi
727731
}
728732

729733
# Generate the dockerfile for a given build, build_type and OS

0 commit comments

Comments
 (0)