|
1 |
| -// Copyright (c) 2019, 2021, Oracle and/or its affiliates. |
| 1 | +// Copyright (c) 2019, 2024, Oracle and/or its affiliates. |
2 | 2 | // Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
|
3 | 3 |
|
4 | 4 | package com.oracle.weblogic.imagetool.util;
|
@@ -70,7 +70,7 @@ public class DockerfileOptions {
|
70 | 70 | private PackageManagerType pkgMgr;
|
71 | 71 | private List<String> patchFilenames;
|
72 | 72 | private MiddlewareInstall mwInstallers;
|
73 |
| - private boolean domainGroupAsUser; |
| 73 | + private boolean useOwnerPermsForGroup; |
74 | 74 | private boolean usingBusybox;
|
75 | 75 | private List<String> buildArgs;
|
76 | 76 |
|
@@ -102,7 +102,7 @@ public DockerfileOptions(String buildId) {
|
102 | 102 | updateOpatch = false;
|
103 | 103 | skipJavaInstall = false;
|
104 | 104 | skipMiddlewareInstall = false;
|
105 |
| - domainGroupAsUser = false; |
| 105 | + useOwnerPermsForGroup = false; |
106 | 106 | usingBusybox = false;
|
107 | 107 | buildArgs = new ArrayList<>();
|
108 | 108 |
|
@@ -1087,14 +1087,26 @@ public DockerfileOptions setWdtBase(String value) {
|
1087 | 1087 | return this;
|
1088 | 1088 | }
|
1089 | 1089 |
|
1090 |
| - public DockerfileOptions setDomainGroupAsUser(boolean value) { |
1091 |
| - domainGroupAsUser = value; |
| 1090 | + /** |
| 1091 | + * Let the Dockerfile know that additional write permissions are required. |
| 1092 | + * When running in OpenShift, 755 permissions is inadequate for some tools |
| 1093 | + * and write permissions must be enabled. For example, OPatch will fail |
| 1094 | + * with code 73 if it does not have write permissions to the cfgtoollogs folder. |
| 1095 | + * @param value true if additional group write permissions are required. |
| 1096 | + * @return this |
| 1097 | + */ |
| 1098 | + public DockerfileOptions useOwnerPermsForGroup(boolean value) { |
| 1099 | + useOwnerPermsForGroup = value; |
1092 | 1100 | return this;
|
1093 | 1101 | }
|
1094 | 1102 |
|
| 1103 | + /** |
| 1104 | + * Returns true if additional write permissions should be used for the OS group. |
| 1105 | + * @return true if group should equal owner permissions for some files/dirs. |
| 1106 | + */ |
1095 | 1107 | @SuppressWarnings("unused")
|
1096 |
| - public boolean domainGroupAsUser() { |
1097 |
| - return domainGroupAsUser; |
| 1108 | + public boolean useOwnerPermsForGroup() { |
| 1109 | + return useOwnerPermsForGroup; |
1098 | 1110 | }
|
1099 | 1111 |
|
1100 | 1112 | /**
|
|
0 commit comments