@@ -39,6 +39,7 @@ public class DockerfileOptions {
39
39
40
40
private static final List <String > DEFAULT_OS_PACKAGES = Arrays .asList (
41
41
"gzip" , "tar" , "unzip" , "libaio" , "libnsl" , "jq" , "findutils" , "diffutils" );
42
+ private static final List <String > BINARY_OS_PACKAGES = Arrays .asList ("binutils" , "make" , "glibc-devel" );
42
43
private static final String WLSIMG_OS_PACKAGES = System .getenv ("WLSIMG_OS_PACKAGES" );
43
44
44
45
private static final String DEFAULT_ORAINV_DIR = "/u01/oracle/oraInventory" ;
@@ -72,6 +73,7 @@ public class DockerfileOptions {
72
73
private MiddlewareInstall mwInstallers ;
73
74
private boolean useOwnerPermsForGroup ;
74
75
private boolean usingBusybox ;
76
+ private boolean includeBinaryOsPackages ;
75
77
private List <String > buildArgs ;
76
78
77
79
// WDT values
@@ -104,6 +106,7 @@ public DockerfileOptions(String buildId) {
104
106
skipMiddlewareInstall = false ;
105
107
useOwnerPermsForGroup = false ;
106
108
usingBusybox = false ;
109
+ includeBinaryOsPackages = false ;
107
110
buildArgs = new ArrayList <>();
108
111
109
112
javaHome = DEFAULT_JAVA_HOME ;
@@ -1109,6 +1112,24 @@ public boolean useOwnerPermsForGroup() {
1109
1112
return useOwnerPermsForGroup ;
1110
1113
}
1111
1114
1115
+ /**
1116
+ * Include OS packages for binary patching such as make for OPatch.
1117
+ * @param value true if additional OS patches for binary patching should be added to the image.
1118
+ * @return this
1119
+ */
1120
+ public DockerfileOptions includeBinaryOsPackages (boolean value ) {
1121
+ includeBinaryOsPackages = value ;
1122
+ return this ;
1123
+ }
1124
+
1125
+ /**
1126
+ * Returns true if additional OS patches for binary patching should be added to the image.
1127
+ * @return true if additional OS patches for binary patching should be added to the image, false otherwise.
1128
+ */
1129
+ public boolean includeBinaryOsPackages () {
1130
+ return includeBinaryOsPackages ;
1131
+ }
1132
+
1112
1133
/**
1113
1134
* Returns true if BusyBox options should be used in the Dockerfile.
1114
1135
*
@@ -1160,6 +1181,9 @@ public List<String> osPackages() {
1160
1181
if (Utils .isEmptyString (WLSIMG_OS_PACKAGES )) {
1161
1182
// If the user did not provide a list of OS packages, use the default list
1162
1183
result .addAll (DEFAULT_OS_PACKAGES );
1184
+ if (includeBinaryOsPackages ()) {
1185
+ result .addAll (BINARY_OS_PACKAGES );
1186
+ }
1163
1187
} else {
1164
1188
// When provided in the environment variable, use the list of OS packages provided by the user.
1165
1189
result .addAll (Stream .of (WLSIMG_OS_PACKAGES .split (" " )).collect (Collectors .toList ()));
0 commit comments