2

I am following the official instructions to run DB2 in docker. I have done this successfully countless times on macOS Intel. I have also done this successfully in Windows 10. But now I am trying to do this in macOS Apple chip (Macbook Air M1). I do this by adding the --platform linux/amd64 option to docker pull and docker run.

This creates the container OK. But all sorts of things go wrong with DB2. First of it appears that DB2 does not start. I manually run db2start to take care of that. Then I have trouble creating a database and connecting to it. I get this message:

SQL1031N The database directory cannot be found on the indicated file system

Looking at db2diag.log does not show any specific error messages.

What do I need to do to run DB2 in docker in Apple silicone?

RajV
  • 6,860
  • 8
  • 44
  • 62
  • Just a note: I don't like running DB2 as a docker container directly on the OS. It requires you to add `--privileged=true` and this can open a BIG security hole in your whole computer. Maybe you should consider running docker inside a VM just to be on the safe side. Well... if you run docker in a VM, then you can pick any free linux flavor, and you won't need to deal with mac features. – The Impaler Apr 18 '21 at 00:24
  • The Impaler, I had tried that option also. macOS ARM -> Intel linux VM -> DB2 docker container. DB2 was having strange problems there as well. For now we are going with a remote DB2 install in a Windows box. But it will be nice to have it running in my Macbook. – RajV Apr 18 '21 at 22:32
  • There's more detail about this problem in this question: https://stackoverflow.com/questions/70175677/ibmcom-db2-docker-image-fails-on-m1 – horstwilhelm Apr 13 '22 at 08:43
  • Does this answer your question? [ibmcom/db2 docker image fails on m1](https://stackoverflow.com/questions/70175677/ibmcom-db2-docker-image-fails-on-m1) – Jens Schauder Sep 20 '22 at 08:08

0 Answers0