Cloud Pak for Data

Cloud Pak for Data

Come for answers. Stay for best practices. All we’re missing is you.

 View Only
  • 1.  Running DB2 on Apple M1 (ARM) laptop in Docker

    Posted Tue February 08, 2022 03:41 AM
    For one of my customers we've setup Docker containers for their developers so that they can develop and test locally (and can reset easily if things go wrong). So far all the developers were running x86_64 CPUs so we could easily create Docker containers for the Db2 they need. However now the first developer started using an ARM CPU based Apple M1. We've tried multiple ways to convert / rebuild the DB2 containers for ARM but without success so far.
    Can anyone advise on this? How we can get / build Docker containers for ARM based systems?

    Thanks a lot in advance for your advise and have a good day - Hermann

    ------------------------------
    Hermann Huebler
    2innovate IT Consulting GmbH
    Vienna
    Austria

    #IBMChampion
    ------------------------------

    #CloudPakforDataGroup


  • 2.  RE: Running DB2 on Apple M1 (ARM) laptop in Docker

    Posted Wed February 09, 2022 01:37 AM
    See if this helps you, nothing I've done but came across the link when I Google DB2 For ARM: https://www.triton.co.uk/db2-on-apple-silicon/

    ------------------------------
    Steve Prior
    ------------------------------



  • 3.  RE: Running DB2 on Apple M1 (ARM) laptop in Docker

    Posted Wed February 09, 2022 02:15 AM
    Thanks for the link! We've seen that before but the issue is that we are running DB2 in a Linux based container so running the DB2 on Windows does not really help I'm afraid.

    ------------------------------
    Hermann Huebler
    2innovate IT Consulting GmbH
    Vienna
    Austria

    #IBMChampion
    ------------------------------



  • 4.  RE: Running DB2 on Apple M1 (ARM) laptop in Docker

    Posted Wed February 09, 2022 01:31 PM
    I realized that this possibility didn't include running DB2 in a Docker container, but thought this could give you an alternative to get the user going - provide a VM image the user could run and connect to for development, then if needed reset by going back to the original VM image.  Not as easy as a container, but any port in a storm...

    ------------------------------
    Steve Prior
    ------------------------------



  • 5.  RE: Running DB2 on Apple M1 (ARM) laptop in Docker

    Posted Wed February 09, 2022 01:40 PM
    Hello Steve, thanks for coming back and elaborating further on this again.
    Well, the idea using a VM instead of a container is an option I've not considered to be honest. Will check with the customer if that's an option.

    Thanks again and have a good day - Hermann

    ------------------------------
    Hermann Huebler
    2innovate IT Consulting GmbH
    Vienna
    Austria

    #IBMChampion
    ------------------------------



  • 6.  RE: Running DB2 on Apple M1 (ARM) laptop in Docker

    Posted Wed February 09, 2022 02:07 AM

    Hi, basically Docker Desktop should do the job. No need to convert as the linux inside the docker vm will emulate x86. You only need to specificy the platform parameter to tell docker to run the x86 image and do not search for an arm based native version. Try something like this:

    docker run -itd --platform linux/amd64 --name mydb2 --privileged=true -p 50000:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=<choose an instance password> -e DBNAME=testdb -v <db storage dir>:/database ibmcom/db2



    p.s.: could not try myself, still waiting for my m1 mac. ;) 



    ------------------------------
    Markus Fraune
    ------------------------------



  • 7.  RE: Running DB2 on Apple M1 (ARM) laptop in Docker

    Posted Wed February 09, 2022 02:23 AM
    Thanks Markus! We've tried that as well and tried to use `docker buildx` with no success. Well - the image can be started but as soon as it comes to start the instances etc. we get plenty of errors as files are not found etc. So once you get your M1, maybe you can give it a try :) . Looking forward to get your feedback on your experiences. Thanks!

    ------------------------------
    Hermann Huebler
    2innovate IT Consulting GmbH
    Vienna
    Austria

    #IBMChampion
    ------------------------------