solomax commented on code in PR #144:
URL: https://github.com/apache/openjpa/pull/144#discussion_r3793575195


##########
pom.xml:
##########
@@ -1633,24 +1609,41 @@
                         <groupId>io.fabric8</groupId>
                         <artifactId>docker-maven-plugin</artifactId>
                         <configuration>
+                            <keepContainer>false</keepContainer>
+                            <removeVolumes>true</removeVolumes>
                             <images>
                                 <image>
-                                    
<!--<name>oracledb19c/oracle.19.3.0-ee:oracle19.3.0-ee</name>-->
-                                    
<name>oracleinanutshell/oracle-xe-11g</name>
-                                    
<!--<name>pvargacl/oracle-xe-18.4.0:latest</name>-->
+                                    
<name>container-registry.oracle.com/database/express:${oracle.server.version}</name>
                                     <run>
+                                        <env>
+                                            
<ORACLE_PWD>${openjpa.oracle.password}</ORACLE_PWD>
+                                        </env>
                                         <volumes>
                                             <bind>
-                                                
<volume>${project.basedir}/src/test/sql/oracle-docker:/docker-entrypoint-initdb.d/</volume>
+                                                
<volume>${project.basedir}/src/test/sql/oracle-docker:/docker-entrypoint-initdb.d/setup/</volume>
+                                                <!-- NOTE this folder MUST 
exist and have correct permissions!!!! -->
+                                                
<volume>${project.basedir}/../jdbc_oradata:/opt/oracle/oradata</volume>

Review Comment:
   Just have checked with additional `<user>...</user>` parameter in `pom.xml`
   
   The most straightforward (available out-of-the-box:
   `<user>${user.name}</user>`
   
   ```
   [INFO] --- docker:0.48.1:start (default-cli) @ openjpa-parent ---
   [INFO] DOCKER> [container-registry.oracle.com/database/express:18.4.0-xe]: 
Start container 6b890d23ec2d
   [ERROR] DOCKER> Error occurred during container startup, shutting down...
   [ERROR] DOCKER> I/O Error [Unable to start container id [6b890d23ec2d] : 
{"message":"unable to find user solomax: no matching entries in passwd file"} 
(Internal Server Error: 500)]
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   ```
   
   with uid manually entered (will require some sort of maven "magic")
   `<user>1000</user>`
   
   ```
   [INFO] --- docker:0.48.1:start (default-cli) @ openjpa-parent ---
   [INFO] DOCKER> [container-registry.oracle.com/database/express:18.4.0-xe]: 
Start container 4fa1a4028c57
   4fa1a4> ORACLE_HOME = [/home/oracle] ? ORACLE_BASE environment variable is 
not being set since this
   4fa1a4> information is not available for the current user ID .
   4fa1a4> You can set ORACLE_BASE manually if it is required.
   4fa1a4> Resetting ORACLE_BASE to its previous value or ORACLE_HOME
   4fa1a4> The Oracle base remains unchanged with value /opt/oracle
   4fa1a4> #####################################
   4fa1a4> ########### E R R O R ###############
   4fa1a4> DATABASE SETUP WAS NOT SUCCESSFUL!
   4fa1a4> Please check output for further info!
   4fa1a4> ########### E R R O R ###############
   4fa1a4> #####################################
   4fa1a4> The following output is now a tail of the alert.log:
   4fa1a4> tail: cannot open '/opt/oracle/diag/rdbms/*/*/trace/alert*.log' for 
reading: No such file or directory
   4fa1a4> tail: no files remaining
   [ERROR] DOCKER> [container-registry.oracle.com/database/express:18.4.0-xe]: 
Container stopped with exit code 1 unexpectedly after 504 ms while waiting on 
log out 'DATABASE IS READY TO USE'
   [ERROR] DOCKER> Error occurred during container startup, shutting down...
   [INFO] DOCKER> [container-registry.oracle.com/database/express:18.4.0-xe]: 
Stop and removed container 4fa1a4028c57 after 0 ms
   [ERROR] DOCKER> I/O Error 
[[container-registry.oracle.com/database/express:18.4.0-xe]: Container stopped 
with exit code 1 unexpectedly after 504 ms while waiting on log out 'DATABASE 
IS READY TO USE']
   [INFO] 
------------------------------------------------------------------------
   [INFO] BUILD FAILURE
   ```
   
   So, I'm afraid, not much can be done here :(



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to