Sure thing, I did two runs. The way we use DB2 will likely not cover all use cases there are for it so it's possible that we just haven't run into any issues because of that.
First run:
docker run -it --name db2 -e DBNAME=testdb -v ~/:/database -e DB2INST1_PASSWORD=GD1OJfLGG64HV2dtwK -e LICENSE=accept -p 50000:50000 --privileged=true --platform=linux/amd64 ibmcom/db2
Unable to find image 'ibmcom/db2:latest' locally
latest: Pulling from ibmcom/db2
8dfe9326f733: Pull complete
0d875a68bf99: Pull complete
50e8fb20327b: Pull complete
a0c05fd037e6: Pull complete
1cd5cf0a05ba: Pull complete
6c97ca72f52c: Pull complete
e0c22e12ea4e: Pull complete
06fa0bd3b2ef: Pull complete
01d61e0e2f08: Pull complete
849d15abca93: Pull complete
be6ee447107f: Pull complete
408a6e6d33a2: Pull complete
a9c177505816: Pull complete
Digest: sha256:81d01c71ed0d1ae27ee51ab53133610970b25b60de385a0c1906fe53017f4c96
Status: Downloaded newer image for ibmcom/db2:latest
(*) Previous setup has not been detected. Creating the users...
(*) Creating users ...
(*) Creating instance ...
DBI1446I The db2icrt command is running.
DB2 installation is being initialized.
Total number of tasks to be performed: 4
Total estimated time for all tasks to be performed: 309 second(s)
Task #1 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #1 end
Task #2 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #2 end
Task #3 start
Description: Configuring DB2 instances
Estimated time 300 second(s)
Task #3 end
Task #4 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #4 end
The execution completed successfully.
For more information see the DB2 installation log at "/tmp/db2icrt.log.229".
DBI1070I Program db2icrt completed successfully.
(*) Fixing /etc/services file for DB2 ...
04/25/2022 15:31:25 0 0 SQL1032N No start database manager command was issued.
SQL1032N No start database manager command was issued. SQLSTATE=57019
(*) Cataloging existing databases
ls: cannot access '/database/data/db2inst1/NODE0000': No such file or directory
(*) Applying Db2 license ...
LIC1402I License added successfully.
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"
(*) Saving the checksum of the current nodelock file ...
(*) Updating DBM CFG parameters ...
DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
successfully.
DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
successfully.
DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
successfully.
No Cgroup memory limit detected, instance memory will follow automatic tuning
(*) Remounting /database with suid...
(*) Nothing appears in the Db2 directory. will skip update/upgrade.
(*) Code level is the same. No update/upgrade needed.
DB2 State : Operable
DB2 has not been started
Starting DB2...
04/25/2022 15:33:08 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
(*) User chose to create testdb database
(*) Creating database testdb ...
DB20000I The CREATE DATABASE command completed successfully.
DB20000I The ACTIVATE DATABASE command completed successfully.
04/25/2022 15:36:15 0 0 SQL1026N The database manager is already active.
SQL1026N The database manager is already active.
### Enabling LOGARCHMETH1
Database Connection Information
Database server = DB2/LINUXX8664 11.5.7.0
SQL authorization ID = DB2INST1
Local database alias = TESTDB
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
SQL1363W One or more of the parameters submitted for immediate modification
were not changed dynamically. For these configuration parameters, the database
must be shutdown and reactivated before the configuration parameter changes
become effective.
### Restarting DB2
04/25/2022 15:36:27 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.
04/25/2022 15:36:28 0 0 SQL1042C An unexpected system error occurred.
SQL1032N No start database manager command was issued. SQLSTATE=57019
### Making backup directory and performing backup
SQL1032N No start database manager command was issued.
(!) Failed to back up testdb database
(*) Applying autoconfiguration for instance ...
SQL1032N No start database manager command was issued. SQLSTATE=57019
SQL1024N A database connection does not exist. SQLSTATE=08003
04/25/2022 15:36:37 0 0 SQL1032N No start database manager command was issued.
SQL1032N No start database manager command was issued. SQLSTATE=57019
04/25/2022 15:36:38 0 0 SQL1042C An unexpected system error occurred.
SQL1032N No start database manager command was issued. SQLSTATE=57019
(!) Failed to automatically configure testdb database
(*) Skipping TEXT_SEARCH setup for database testdb because TEXT_SEARCH is not configured for the instance ...
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
(*) All databases are now active.
(*) Setup has completed.
false
2022-04-25-15.36.38.674765+000 I167521E393 LEVEL: Warning
PID : 36948 TID : 275370269632 PROC : db2start
INSTANCE: db2inst1 NODE : 000
HOSTNAME: 9bcdfdc2bdb7
FUNCTION: DB2 UDB, base sys utilities, sqleReleaseStStLockFile, probe:16187
MESSAGE : Released lock on the file:
DATA #1 : String, 50 bytes
/database/config/db2inst1/sqllib/ctrl/db2strst.lck
Second run:
> docker run -it --name db2 -e DBNAME=testdb -e DB2INST1_PASSWORD=GD1OJfLGG64HV2dtwK -e LICENSE=accept -p 50000:50000 --privileged=true --platform=linux/amd64 ibmcom/db2
(*) Previous setup has not been detected. Creating the users...
(*) Creating users ...
(*) Creating instance ...
DBI1446I The db2icrt command is running.
DB2 installation is being initialized.
Total number of tasks to be performed: 4
Total estimated time for all tasks to be performed: 309 second(s)
Task #1 start
Description: Setting default global profile registry variables
Estimated time 1 second(s)
Task #1 end
Task #2 start
Description: Initializing instance list
Estimated time 5 second(s)
Task #2 end
Task #3 start
Description: Configuring DB2 instances
Estimated time 300 second(s)
Task #3 end
Task #4 start
Description: Updating global profile registry
Estimated time 3 second(s)
Task #4 end
The execution completed successfully.
For more information see the DB2 installation log at "/tmp/db2icrt.log.229".
DBI1070I Program db2icrt completed successfully.
(*) Fixing /etc/services file for DB2 ...
04/25/2022 15:53:02 0 0 SQL1032N No start database manager command was issued.
SQL1032N No start database manager command was issued. SQLSTATE=57019
(*) Cataloging existing databases
ls: cannot access '/database/data/db2inst1/NODE0000': No such file or directory
(*) Applying Db2 license ...
LIC1402I License added successfully.
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"
(*) Saving the checksum of the current nodelock file ...
(*) Updating DBM CFG parameters ...
DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
successfully.
DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
successfully.
DB20000I The UPDATE DATABASE MANAGER CONFIGURATION command completed
successfully.
No Cgroup memory limit detected, instance memory will follow automatic tuning
(*) Remounting /database with suid...
(*) Nothing appears in the Db2 directory. will skip update/upgrade.
(*) Code level is the same. No update/upgrade needed.
DB2 State : Operable
DB2 has not been started
Starting DB2...
04/25/2022 15:54:31 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
(*) User chose to create testdb database
(*) Creating database testdb ...
DB20000I The CREATE DATABASE command completed successfully.
DB20000I The ACTIVATE DATABASE command completed successfully.
04/25/2022 15:56:43 0 0 SQL1026N The database manager is already active.
SQL1026N The database manager is already active.
### Enabling LOGARCHMETH1
Database Connection Information
Database server = DB2/LINUXX8664 11.5.7.0
SQL authorization ID = DB2INST1
Local database alias = TESTDB
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
SQL1363W One or more of the parameters submitted for immediate modification
were not changed dynamically. For these configuration parameters, the database
must be shutdown and reactivated before the configuration parameter changes
become effective.
### Restarting DB2
04/25/2022 15:56:54 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.
04/25/2022 15:56:57 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
### Making backup directory and performing backup
Backup successful. The timestamp for this backup image is : 20220425155701
(*) Applying autoconfiguration for instance ...
Database Connection Information
Database server = DB2/LINUXX8664 11.5.7.0
SQL authorization ID = DB2INST1
Local database alias = TESTDB
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
SQL1363W One or more of the parameters submitted for immediate modification
were not changed dynamically. For these configuration parameters, the database
must be shutdown and reactivated before the configuration parameter changes
become effective.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
DB20000I The UPDATE DATABASE CONFIGURATION command completed successfully.
SQL1363W One or more of the parameters submitted for immediate modification
were not changed dynamically. For these configuration parameters, the database
must be shutdown and reactivated before the configuration parameter changes
become effective.
DB20000I The SQL command completed successfully.
04/25/2022 15:57:20 0 0 SQL1064N DB2STOP processing was successful.
SQL1064N DB2STOP processing was successful.
04/25/2022 15:57:24 0 0 SQL1063N DB2START processing was successful.
SQL1063N DB2START processing was successful.
(*) Skipping TEXT_SEARCH setup for database testdb because TEXT_SEARCH is not configured for the instance ...
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
(*) All databases are now active.
(*) Setup has completed.
Log File Size: 1024
2022-04-25-15.57.46.986055+000 E250474E526 LEVEL: Event
PID : 38573 TID : 275590932224 PROC : db2sysc 0
INSTANCE: db2inst1 NODE : 000 DB : TESTDB
APPHDL : 0-7 APPID: 172.17.0.1.60550.220425155744
AUTHID : DB2INST1 HOSTNAME: a39a8d31c347
EDUID : 22 EDUNAME: db2agent (idle) 0
FUNCTION: DB2 UDB, base sys utilities, sqeLocalDatabase::FreeResourcesOnDBShutdown, probe:16859
STOP : DATABASE: TESTDB : DEACTIVATED: NO
tail: inotify cannot be used, reverting to polling: Function not implemented
------------------------------
Jonathan Herdt
------------------------------
Original Message:
Sent: Mon April 25, 2022 02:14 PM
From: IRINA DELIDJAKOVA
Subject: DB2 LUW. 11.5.xx - Mac M1 ready
Hi @Jonathan Herdt, thanks for looking into this!! We are also going through some of the issues before we can publish a new container with instructions. Using the export env, helps with some issues, but not all. We're still hitting other issues that are being looked at - example some env not persisted. Can you provide the logs from your run? I am surprised you're successful with just that workaround.
------------------------------
IRINA DELIDJAKOVA
Original Message:
Sent: Mon April 25, 2022 12:09 PM
From: Jonathan Herdt
Subject: DB2 LUW. 11.5.xx - Mac M1 ready
Was able to find a working solution by running `export DOCKER_DEFAULT_PLATFORM=linux/amd64` before starting my container. This apparently enables a (poorly documented?) x86 compatibility mode in Docker :) You might have to remove your image first before this.
------------------------------
Jonathan Herdt
Original Message:
Sent: Mon January 18, 2021 07:57 PM
From: Jürgen Jost
Subject: DB2 LUW. 11.5.xx - Mac M1 ready
Hello,
Is the DB2 LUW community edition 11.5.xx (may be on docker) M1 ready?
My profile
Juergen Jost