I am attempting to create a Docker image based on
ibmcom/db2:11.5.4.0 with test databases added during the image build process. Although I am able to run and connect to the IBM Db2 instance within a privileged container run following the image build process, I am unable to do so during the image build process itself. I wish to start Db2 during the image build process so that I can load test data to be made available in a running container subsequently created from the image. I am attempting to build the image as follows (to enable privileged containers during the build):
docker buildx build --allow security.insecure --load -t IMAGE:TAG .
Here is the output from the
docker buildx build command (output from
db2diag.log omitted for sake of brevity):
#14 0.149 (*) Previous setup has not been detected. Creating the users...
#14 0.149 (*) Creating users ...
#14 0.227 (*) Creating instance ...
#14 0.870 DB2 installation is being initialized.
#14 0.870
#14 0.870 Total number of tasks to be performed: 4
#14 3.524 Total estimated time for all tasks to be performed: 309 second(s)
#14 3.524
#14 3.534 Task #1 start
#14 3.534 Description: Setting default global profile registry variables
#14 3.534 Estimated time 1 second(s)
#14 3.575 Task #1 end
#14 3.575
#14 3.580 Task #2 start
#14 3.580 Description: Initializing instance list
#14 3.580 Estimated time 5 second(s)
#14 4.521 Task #2 end
#14 4.521
#14 4.525 Task #3 start
#14 4.525 Description: Configuring DB2 instances
#14 4.525 Estimated time 300 second(s)
#14 20.17 Task #3 end
#14 20.17
#14 20.18 Task #4 start
#14 20.18 Description: Updating global profile registry
#14 20.18 Estimated time 3 second(s)
#14 20.18 Task #4 end
#14 20.18
#14 20.19 The execution completed successfully.
#14 20.19
#14 21.91 For more information see the DB2 installation log at "/tmp/db2icrt.log.70".
#14 21.92 DBI1446I The db2icrt command is running.
#14 21.92
#14 21.92
#14 21.92 DBI1070I Program db2icrt completed successfully.
#14 21.92
#14 21.92
#14 22.20 08/10/2020 21:11:37 0 0 SQL1032N No start database manager command was issued.
#14 22.20 SQL1032N No start database manager command was issued. SQLSTATE=57019
#14 23.69 (*) Cataloging existing databases
#14 23.69 ls: cannot access /database/data/db2inst1/NODE0000: No such file or directory
#14 23.69 (*) Applying Db2 license ...
#14 23.74
#14 23.74 LIC1402I License added successfully.
#14 23.74
#14 23.74
#14 23.74 LIC1426I This product is now licensed for use as outlined in your License Agreement. USE OF THE PRODUCT CONSTITUTES ACCEPTANCE OF THE TERMS OF THE IBM LICENSE AGREEMENT, LOCATED IN THE FOLLOWING DIRECTORY: "/opt/ibm/db2/V11.5/license/en_US.iso88591"
#14 23.74 (*) Saving the checksum of the current nodelock file ...
#14 23.75 (*) Updating DBM CFG parameters ...
#14 25.19 DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
#14 25.19 successfully.
#14 26.37 DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
#14 26.37 successfully.
#14 27.53 DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
#14 27.53 successfully.
#14 27.53 No Cgroup memory limit detected, instance memory will follow automatic tuning
#14 27.53 (*) Remounting /database with suid...
#14 27.53 mount: can't find /database in /etc/fstab
#14 27.62
#14 27.62 DB2 State : Operable
#14 27.62 DB2 has not been started
#14 27.62 Starting DB2...
#14 27.62
#14 88.00 08/10/2020 21:12:43 0 0 SQL1042C An unexpected system error occurred.
#14 88.00 SQL1032N No start database manager command was issued. SQLSTATE=57019
------------------------------
Michael Morey
------------------------------
#Db2