Skip to content

Commit 2ceb2f5

Browse files
authored
fix size of images (#2971)
1 parent a7520e4 commit 2ceb2f5

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed

OracleDatabase/RAC/OracleRealApplicationClusters/containerfiles/19.3.0/Containerfile

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ RUN chmod 755 $INSTALL_SCRIPTS/*.sh && \
135135
$INSTALL_DIR/install/$SETUP_LINUX_FILE && \
136136
$INSTALL_DIR/install/$GRID_SETUP_FILE && \
137137
$INSTALL_DIR/install/$DB_SETUP_FILE && \
138+
rm -rf $DB_HOME/.patch_storage $DB_HOME/.opatchauto_storage $GRID_HOME/.patch_storage $GRID_HOME/.opatchauto_storage && \
138139
sync
139140

140141
#############################################
@@ -171,6 +172,7 @@ RUN chmod 755 $INSTALL_SCRIPTS/*.sh && \
171172
$INSTALL_DIR/install/$SETUP_LINUX_FILE && \
172173
$INSTALL_DIR/install/$GRID_SETUP_FILE && \
173174
$INSTALL_DIR/install/$DB_SETUP_FILE && \
175+
rm -rf $DB_HOME/.patch_storage $DB_HOME/.opatchauto_storage $GRID_HOME/.patch_storage $GRID_HOME/.opatchauto_storage && \
174176
sync
175177

176178

@@ -184,9 +186,15 @@ FROM rac-image-slim-${SLIMMING} AS builder
184186
ARG SLIMMING
185187
# hadolint ignore=DL3006
186188
ARG VERSION
189+
# Linux Env Variable
190+
ENV GRID_BASE=/u01/app/grid \
191+
GRID_HOME=/u01/app/19c/grid \
192+
DB_BASE=/u01/app/oracle \
193+
DB_HOME=/u01/app/oracle/product/19c/dbhome_1
187194
COPY $VERSION/$INSTALL_GRID_BINARIES_FILE $VERSION/$GRID_SW_INSTALL_RSP $VERSION/$DB_SETUP_FILE $VERSION/$DB_INSTALL_RSP $VERSION/$INSTALL_DB_BINARIES_FILE $VERSION/$ENABLE_RAC_FILE $VERSION/$GRID_HOME_CLEANUP $VERSION/$ORACLE_HOME_CLEANUP $VERSION/$INSTALL_FILE_1* $VERSION/$INSTALL_FILE_2* $INSTALL_SCRIPTS/
188195
# hadolint ignore=SC2086
189-
RUN chmod 755 $INSTALL_SCRIPTS/*.sh
196+
RUN chmod 755 $INSTALL_SCRIPTS/*.sh && \
197+
rm -rf $DB_HOME/.patch_storage $DB_HOME/.opatchauto_storage $GRID_HOME/.patch_storage $GRID_HOME/.opatchauto_storage
190198

191199
## Install software if SLIMMING is false
192200
# hadolint ignore=SC2086
@@ -202,6 +210,7 @@ RUN if [ "${SLIMMING}x" != 'truex' ]; then \
202210
$DB_HOME/root.sh && \
203211
su $GRID_USER -c "$INSTALL_SCRIPTS/$GRID_HOME_CLEANUP" && \
204212
su $DB_USER -c "$INSTALL_SCRIPTS/$ORACLE_HOME_CLEANUP" && \
213+
rm -rf $DB_HOME/.patch_storage $DB_HOME/.opatchauto_storage $GRID_HOME/.patch_storage $GRID_HOME/.opatchauto_storage && \
205214
:; \
206215
fi
207216
# hadolint ignore=SC3014
@@ -211,6 +220,7 @@ RUN if [ "${SLIMMING}x" == 'truex' ]; then \
211220
fi
212221
# hadolint ignore=SC2086
213222
RUN rm -f $INSTALL_DIR/install/* && \
223+
rm -rf $DB_HOME/.patch_storage $DB_HOME/.opatchauto_storage $GRID_HOME/.patch_storage $GRID_HOME/.opatchauto_storage && \
214224
sync
215225

216226
#############################################
@@ -220,6 +230,11 @@ RUN rm -f $INSTALL_DIR/install/* && \
220230
#############################################
221231
# hadolint ignore=DL3006
222232
FROM rac-image-slim-${SLIMMING} AS final
233+
ENV GRID_BASE=/u01/app/grid \
234+
GRID_HOME=/u01/app/19c/grid \
235+
DB_BASE=/u01/app/oracle \
236+
DB_HOME=/u01/app/oracle/product/19c/dbhome_1
237+
RUN rm -rf $DB_HOME/.patch_storage $DB_HOME/.opatchauto_storage $GRID_HOME/.patch_storage $GRID_HOME/.opatchauto_storage
223238
# hadolint ignore=DL3006
224239
COPY --from=builder /u01 /u01
225240
# hadolint ignore=SC2086
@@ -245,6 +260,7 @@ RUN if [ "${SLIMMING}x" != 'truex' ]; then \
245260
rm -f /etc/sysctl.d/99-oracle-database-preinstall-19c-sysctl.conf && \
246261
rm -f /etc/sysctl.d/99-sysctl.conf && \
247262
rm -f $INSTALL_DIR/install/* && \
263+
rm -rf $DB_HOME/.patch_storage $DB_HOME/.opatchauto_storage $GRID_HOME/.patch_storage $GRID_HOME/.opatchauto_storage && \
248264
sync
249265

250266
USER ${USER}

OracleDatabase/RAC/OracleRealApplicationClusters/containerfiles/21.3.0/Containerfile

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ RUN chmod 755 $INSTALL_SCRIPTS/*.sh && \
134134
$INSTALL_DIR/install/$SETUP_LINUX_FILE && \
135135
$INSTALL_DIR/install/$GRID_SETUP_FILE && \
136136
$INSTALL_DIR/install/$DB_SETUP_FILE && \
137+
rm -rf $DB_HOME/.patch_storage $DB_HOME/.opatchauto_storage $GRID_HOME/.patch_storage $GRID_HOME/.opatchauto_storage && \
137138
sync
138139

139140
#############################################
@@ -168,6 +169,7 @@ RUN chmod 755 $INSTALL_SCRIPTS/*.sh && \
168169
$INSTALL_DIR/install/$SETUP_LINUX_FILE && \
169170
$INSTALL_DIR/install/$GRID_SETUP_FILE && \
170171
$INSTALL_DIR/install/$DB_SETUP_FILE && \
172+
rm -rf $DB_HOME/.patch_storage $DB_HOME/.opatchauto_storage $GRID_HOME/.patch_storage $GRID_HOME/.opatchauto_storage && \
171173
sync
172174

173175

@@ -181,6 +183,11 @@ FROM rac-image-slim-${SLIMMING} AS builder
181183
ARG SLIMMING
182184
# hadolint ignore=DL3006
183185
ARG VERSION
186+
# Linux Env Variable
187+
ENV GRID_BASE=/u01/app/grid \
188+
GRID_HOME=/u01/app/21c/grid \
189+
DB_BASE=/u01/app/oracle \
190+
DB_HOME=/u01/app/oracle/product/21c/dbhome_1
184191
COPY $VERSION/$INSTALL_GRID_BINARIES_FILE $VERSION/$GRID_SW_INSTALL_RSP $VERSION/$DB_SETUP_FILE $VERSION/$DB_INSTALL_RSP $VERSION/$INSTALL_DB_BINARIES_FILE $VERSION/$ENABLE_RAC_FILE $VERSION/$GRID_HOME_CLEANUP $VERSION/$ORACLE_HOME_CLEANUP $VERSION/$INSTALL_FILE_1* $VERSION/$INSTALL_FILE_2* $INSTALL_SCRIPTS/
185192
# hadolint ignore=SC2086
186193
RUN chmod 755 $INSTALL_SCRIPTS/*.sh
@@ -199,6 +206,7 @@ RUN if [ "${SLIMMING}x" != 'truex' ]; then \
199206
$DB_HOME/root.sh && \
200207
su $GRID_USER -c "$INSTALL_SCRIPTS/$GRID_HOME_CLEANUP" && \
201208
su $DB_USER -c "$INSTALL_SCRIPTS/$ORACLE_HOME_CLEANUP" && \
209+
rm -rf $DB_HOME/.patch_storage $DB_HOME/.opatchauto_storage $GRID_HOME/.patch_storage $GRID_HOME/.opatchauto_storage && \
202210
:; \
203211
fi
204212
# hadolint ignore=SC3014
@@ -208,6 +216,7 @@ RUN if [ "${SLIMMING}x" == 'truex' ]; then \
208216
fi
209217
# hadolint ignore=SC2086
210218
RUN rm -f $INSTALL_DIR/install/* && \
219+
rm -rf $DB_HOME/.patch_storage $DB_HOME/.opatchauto_storage $GRID_HOME/.patch_storage $GRID_HOME/.opatchauto_storage && \
211220
sync
212221

213222
#############################################
@@ -217,6 +226,11 @@ RUN rm -f $INSTALL_DIR/install/* && \
217226
#############################################
218227
# hadolint ignore=DL3006
219228
FROM rac-image-slim-${SLIMMING} AS final
229+
ENV GRID_BASE=/u01/app/grid \
230+
GRID_HOME=/u01/app/21c/grid \
231+
DB_BASE=/u01/app/oracle \
232+
DB_HOME=/u01/app/oracle/product/21c/dbhome_1
233+
RUN rm -rf $DB_HOME/.patch_storage $DB_HOME/.opatchauto_storage $GRID_HOME/.patch_storage $GRID_HOME/.opatchauto_storage
220234
# hadolint ignore=DL3006
221235
COPY --from=builder /u01 /u01
222236
# hadolint ignore=SC2086
@@ -242,6 +256,7 @@ RUN if [ "${SLIMMING}x" != 'truex' ]; then \
242256
rm -f /etc/sysctl.d/99-oracle-database-preinstall-21c-sysctl.conf && \
243257
rm -f /etc/sysctl.d/99-sysctl.conf && \
244258
rm -f $INSTALL_DIR/install/* && \
259+
rm -rf $DB_HOME/.patch_storage $DB_HOME/.opatchauto_storage $GRID_HOME/.patch_storage $GRID_HOME/.opatchauto_storage && \
245260
sync
246261

247262
USER ${USER}
@@ -268,7 +283,8 @@ ARG VERSION
268283
ENV GRID_BASE=/u01/app/grid \
269284
GRID_HOME=/u01/app/21c/grid \
270285
DB_BASE=/u01/app/oracle \
271-
DB_HOME=/u01/app/oracle/product/21c/dbhome_1
286+
DB_HOME=/u01/app/oracle/product/21c/dbhome_1 \
287+
SLIMMING=false
272288
# Use second ENV so that variable get substituted
273289
# hadolint ignore=DL3044
274290
ENV INSTALL_SCRIPTS=$INSTALL_DIR/install \
@@ -278,4 +294,5 @@ ENV INSTALL_SCRIPTS=$INSTALL_DIR/install \
278294
GRID_PATH=$GRID_HOME/bin:$GRID_HOME/OPatch/:$GRID_HOME/perl/bin:/usr/sbin:/bin:/sbin \
279295
DB_PATH=$DB_HOME/bin:$DB_HOME/OPatch/:$DB_HOME/perl/bin:/usr/sbin:/bin:/sbin \
280296
GRID_LD_LIBRARY_PATH=$GRID_HOME/lib:/usr/lib:/lib \
281-
DB_LD_LIBRARY_PATH=$DB_HOME/lib:/usr/lib:/lib
297+
DB_LD_LIBRARY_PATH=$DB_HOME/lib:/usr/lib:/lib
298+
COPY $VERSION/$ADDNODE_RSP $VERSION/$GRID_INSTALL_RSP $VERSION/$DBCA_RSP $SCRIPT_DIR/

0 commit comments

Comments
 (0)