Skip to content

Commit

Permalink
Add libnsl OS package to images in support of ADR and FMW Control (#409)
Browse files Browse the repository at this point in the history
* Install libnsl to all middleware images to support ADR and FMW Control

* Set LD_LIBRARY_PATH in newly created images to include ADR libraries

* added Javadoc per static code review

* fixed Javadoc typo

* static code cleanup in REGEX, removed unnecessary ?
  • Loading branch information
ddsharpe authored Dec 9, 2022
1 parent 5f4dbb0 commit 55f721a
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,19 @@ String buildDir() throws IOException {
/**
* Override the default behavior for generating a temp directory.
* This method is used by UNIT tests ONLY.
* @param value should be the value of a temp directory generated by the the UNIT test framework
* @param value should be the value of a temp directory generated by the UNIT test framework
*/
void setBuildDirectory(String value) {
buildDirectory = value;
}

/**
* Apply command line values associated with CommonOptions to Dockerfile options.
* @throws IOException thrown if WIT version cannot be retrieved, or Proxy URLs cannot be read, or
* provided additional build commands file cannot be read.
* @throws InvalidCredentialException Overriding classes may throw this exception
* @throws InvalidPatchIdFormatException Overriding classes may throw this exception
*/
void initializeOptions() throws InvalidCredentialException, IOException, InvalidPatchIdFormatException {
logger.entering();
buildId = UUID.randomUUID().toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
* This class is a simple log formatting class designed to include the ResourceBundle's MessageKey in the log.
*/
public class FileFormatter extends Formatter {
private static final String CATALOG_KEY_PATTERN_STRING = "^[A-Z]{3,10}?-[0-9]{3,5}?$";
private static final String CATALOG_KEY_PATTERN_STRING = "^[A-Z]{3,10}-[0-9]{3,5}$";
private static final Pattern CATALOG_KEY_PATTERN = Pattern.compile(CATALOG_KEY_PATTERN_STRING);

private static final String DATE_FORMAT_STRING = "####<{0,date,yyyy.MM.dd} {0,time,HH:mm:ss}>";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ USER root
FROM os_update as final_build

ENV ORACLE_HOME={{{oracle_home}}} \
LD_LIBRARY_PATH={{{oracle_home}}}/oracle_common/adr:$LD_LIBRARY_PATH \
{{#installJava}}
JAVA_HOME={{{java_home}}} \
{{/installJava}}
Expand All @@ -40,9 +41,8 @@ ENV ORACLE_HOME={{{oracle_home}}} \
{{#modelOnly}}
WDT_MODEL_HOME={{{wdt_model_home}}} \
{{/modelOnly}}
{{/isWdtEnabled}}
PATH=${PATH}:{{{java_home}}}/bin:{{{oracle_home}}}/oracle_common/common/bin:{{{oracle_home}}}/wlserver/common/bin:{{{oracle_home}}}{{#isWdtEnabled}}:{{{domain_home}}}/bin
{{/isWdtEnabled}}
PATH=${PATH}:{{{java_home}}}/bin:{{{oracle_home}}}/oracle_common/common/bin:{{{oracle_home}}}/wlserver/common/bin:{{{oracle_home}}}{{#isWdtEnabled}}:{{{domain_home}}}/bin{{/isWdtEnabled}}

LABEL com.oracle.weblogic.imagetool.buildid="{{buildId}}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ LABEL com.oracle.weblogic.imagetool.buildid="{{buildId}}"
FROM os_update as final_build

ENV ORACLE_HOME={{{oracle_home}}} \
LD_LIBRARY_PATH={{{oracle_home}}}/oracle_common/adr:$LD_LIBRARY_PATH \
{{#installJava}}
JAVA_HOME={{{java_home}}} \
{{/installJava}}
PATH=${PATH}:{{{java_home}}}/bin:{{{oracle_home}}}/oracle_common/common/bin:{{{oracle_home}}}/wlserver/common/bin:{{{oracle_home}}}
PATH=${PATH}:{{{java_home}}}/bin:{{{oracle_home}}}/oracle_common/common/bin:{{{oracle_home}}}/wlserver/common/bin:{{{oracle_home}}}

LABEL com.oracle.weblogic.imagetool.buildid="{{buildId}}"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@
# Ensure necessary OS packages are installed
{{#useYum}}
RUN yum -y update \
&& yum -y --downloaddir={{{tempDir}}} install gzip tar unzip libaio jq findutils diffutils {{#osPackages}}{{{.}}} {{/osPackages}}\
&& yum -y --downloaddir={{{tempDir}}} install gzip tar unzip libaio libnsl jq findutils diffutils {{#osPackages}}{{{.}}} {{/osPackages}}\
&& yum -y --downloaddir={{{tempDir}}} clean all \
&& rm -rf /var/cache/yum/* \
&& rm -rf {{{tempDir}}}
{{/useYum}}
{{#useDnf}}
RUN dnf -y update \
&& dnf -y install gzip tar unzip libaio jq findutils diffutils {{#osPackages}}{{{.}}} {{/osPackages}}\
&& dnf -y install gzip tar unzip libaio libnsl jq findutils diffutils {{#osPackages}}{{{.}}} {{/osPackages}}\
&& dnf clean all
{{/useDnf}}
{{#useMicroDnf}}
RUN microdnf update \
&& microdnf install gzip tar unzip libaio jq findutils diffutils shadow-utils {{#osPackages}}{{{.}}} {{/osPackages}}\
&& microdnf install gzip tar unzip libaio libnsl jq findutils diffutils shadow-utils {{#osPackages}}{{{.}}} {{/osPackages}}\
&& microdnf clean all
{{/useMicroDnf}}
{{#useAptGet}}
RUN apt-get -y update \
&& apt-get -y upgrade \
&& apt-get -y install gzip tar unzip libaio jq findutils diffutils {{#osPackages}}{{{.}}} {{/osPackages}}\
&& apt-get -y install gzip tar unzip libaio libnsl jq findutils diffutils {{#osPackages}}{{{.}}} {{/osPackages}}\
&& apt-get -y clean all
{{/useAptGet}}
{{#useApk}}
Expand Down

0 comments on commit 55f721a

Please # to comment.