Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RTU_ENABLED doesn't work as there is no VOLUME statement in dockerfiles #25

Open
ksawerykarwacki opened this issue May 12, 2020 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@ksawerykarwacki
Copy link

As described in the title this snippet doesn't work anymore. I ended up with image without apex and ords started.

`# RTU_ENABLED default 'N'

The following is used for preparing "ready to use" images for internal use only.

if [[ $RTU_ENABLED =~ (Y|y) ]]; then
echo "##### Modify target Dockerfile #####"
REPLACEMENT_STRING=$'COPY scripts/setup/ $ORACLE_BASE/scripts/setup/\\nCOPY scripts/startup/ $ORACLE_BASE/scripts/startup/\\nCOPY files/ /tmp/files/\\n'
sed $SED_OPTS "s|^VOLUME.+$|${REPLACEMENT_STRING}|g" dockerfiles/${DB_VERSION}/${DOCKER_FILE:-Dockerfile}
mkdir -p dockerfiles/${DB_VERSION}/files
cp $FILES_DIR/$INSTALL_FILE_APEX $FILES_DIR/$INSTALL_FILE_ORDS $FILES_DIR/$INSTALL_FILE_JAVA dockerfiles/${DB_VERSION}/files/
cp -R scripts dockerfiles/${DB_VERSION}/scripts
fi`

@fuzziebrain fuzziebrain self-assigned this May 12, 2020
@fuzziebrain fuzziebrain added the bug Something isn't working label May 12, 2020
@fuzziebrain
Copy link
Owner

Thanks. It appears the VOLUME statement was removed a few months ago. I'll work on a fix.

@ksawerykarwacki
Copy link
Author

Great, I'm looking forward because I really need this feature and reliable way to build images pretty soon (12c lifecycle ends in November, time to start running dev tests and regression on something newer)

@Coffei
Copy link

Coffei commented Oct 17, 2022

For anybody interested, I fixed the RTU with the following diff. Since there's no VOLUME in the Dockerfile I just put the COPY statements before CMD (which should stay as the last command in the Dockerfile). Feel free to use the diff in any way.

diff --git a/01-build.sh b/01-build.sh
index 46003fa..fd555e9 100755
--- a/01-build.sh
+++ b/01-build.sh
@@ -111,9 +111,9 @@ cd $BASE_DIR
 if [[ $RTU_ENABLED =~ (Y|y) ]]; then
   echo "##### Modify target Dockerfile #####"
   REPLACEMENT_STRING=$'COPY scripts/setup/ \$ORACLE_BASE/scripts/setup/\\\nCOPY scripts/startup/ \$ORACLE_BASE/scripts/startup/\\\nCOPY files/ /tmp/files/\\\n'
-  sed $SED_OPTS "s|^VOLUME.+$|${REPLACEMENT_STRING}|g" dockerfiles/${DB_VERSION}/${DOCKER_FILE:-Dockerfile}
+  sed $SED_OPTS "s|^CMD.+$|${REPLACEMENT_STRING}\0|g" dockerfiles/${DB_VERSION}/${DOCKER_FILE:-Dockerfile}
   mkdir -p dockerfiles/${DB_VERSION}/files
   cp $FILES_DIR/$INSTALL_FILE_APEX $FILES_DIR/$INSTALL_FILE_ORDS $FILES_DIR/$INSTALL_FILE_JAVA dockerfiles/${DB_VERSION}/files/
   cp -R scripts dockerfiles/${DB_VERSION}/scripts
 fi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants